Not able to import a new collection csv file
how would you set the data types to 'array' or 'number' as opposed to a string, which is the default?
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
how would you set the data types to 'array' or 'number' as opposed to a string, which is the default?
Hi Alex,
please specify what problem you have.
Also please try following use case to understand how import/export works.
Open your Appery.io DB.
Export to local .csv file.
Open .csv file in text editor and you will see correct format.
Regards.
If one opens a file in excel and still wants to keep the formatting intact such that one can import it back into DB on appery then following code code can be used in excel.
Public Sub OutputQuotedCSV()
Const QSTR As String = """"
Dim myRecord As Range
Dim myField As Range
Dim nFileNum As Long
Dim sOut As String
Code: Select all
nFileNum = FreeFile
Open "File1.csv" For Output As #nFileNum
For Each myRecord In Range("A1:A" & _
Range("A" & Rows.Count).End(xlUp).Row)
With myRecord
For Each myField In Range(.Cells(1), _
Cells(.Row, 256).End(xlToLeft))
sOut = sOut & "," & QSTR & _
Replace(myField.Text, QSTR, QSTR & QSTR) & QSTR
Next myField
Print #nFileNum, Mid(sOut, 2)
sOut = Empty
End With
Next myRecord
Close #nFileNum
End Sub For this code to work, you would have to activate "developer" mode in excel (office 2013), goto file menu-options-customize ribbon-choose developer. You will now see a developer tab in the menu.
Then, open the excel sheet you want to modify. Goto developer tab-visual basic-Insert a module-copy paste the above code-come back to your excel sheet-click on macros button in menu items-choose the module name you created in VB-run the macro.
You will find a .txt file now created in the same folder on your pc as your excel sheet. Change the extension to .csv. You are ready to upload that file now back into your appery DB
I used the following link to find the above method:
Thanks for sharing that, Anil!
This is a great tip! Thanks, Anil.
Support, would it be possible to include this in the documentation somehow. 99% of the people will edit CSV in Excel, and get stuck because Appery does not import the Excel generated CSV file. The above work-around works fine.
Hello!
Sent your request to tech writers, thanks!