-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read .csv file from flash drive #5
Comments
Make sure your filename is all capitalized.
…On Thu, Sep 19, 2019 at 4:39 PM yaronze ***@***.***> wrote:
Hi,
I am working with the updated CH376msc library.
I tried to read a csv (type of Excel) file from flash drive using the
library example, but no success.
After i changed the file extension on flash drive to TXT - everything work
just great.
A .csv file is actually kind of text file where data is comma delimited.
Why it is not possible to read other files that are not TXT type?
Is there any way that will enable read other file types?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AAAQ7GD4OP5HPEOL5QUIDWTQKPPQXA5CNFSM4IYPZ7U2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMQS64Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAQ7GAUDIU4LOKE7JKADJDQKPPQXANCNFSM4IYPZ7UQ>
.
--
Scott Lawrence
yorgle@gmail.com
|
Hi, |
Hi |
I have tested and opened files with .CSV extensions without problem.I created 3 file on the flash drive, TEST1.CSV, test2.CSV and test3.csv . In all three cases i had to use capitalized filename and extension while calling setFileName function otherwise i got file not found error code (0x42). Try to insert a serial print while calling openFile function and let's see what happens. Instead of |
Hi, |
42 code means, the ch376 cannot find a file specified. I think the problem is around your flash drive or file name. I have made a test and i succesfully opened a file with .CSV extension. Don't use longer file name than 8 character + 3 character extension. e.g. JOHNDOE1.CSV . FAT file name |
I am using flash drive formatted FAT32. |
Hi, |
Hi
|
I also did what you suggested - i changed the file extension in the library example to .CSV. |
Is the file ASCII or UTF-8? If it's UTF/unicode/16 bits/byte it might have
problems?
…On Sat, Sep 21, 2019 at 11:45 AM yaronze ***@***.***> wrote:
I also did what you suggested - i changed the file extension in the
library example to .CSV.
The TEST1.CSV file was created ok. The text is in the file.
I can read the .csv file using command '3'.
It seems that the problem is to read a .csv file that was created by
Excel. I'm not sure.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5?email_source=notifications&email_token=AAAQ7GE2O2V5IF7UAHN7BZLQKY6RXA5CNFSM4IYPZ7U2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IUGDI#issuecomment-533807885>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAQ7GEOKTR5MJP4ZC3AXL3QKY6RXANCNFSM4IYPZ7UQ>
.
--
Scott Lawrence
yorgle@gmail.com
|
Ahha, you forget the '\n' (new line) character. |
It can be or the MS excell add some extra data to his csv file |
Yes. |
Your code is public? It would be much easier to understand the problem if we could see the code. Probably something goes wrong when you convert the String object to char array, so I'm just guessing |
Hi, //call miliseconds to time conversion if (fileError == true) {stateErr = F("Error");} logString = String(logCount)+ ','+ strTime+ ',' + logAction + "," + String(logStep)+ "," + if(flashDrive.checkDrive()) {
}else { // if the file isn't open, pop up an error } |
Hi,
|
THANK YOU!!! Now i got to figure out why the .csv file gives 42h error code. I have a walk around to work with .TXT file, but prefer nice .csv. |
I'm glad I could help and it works. So then i close this issue. |
Hi,
I am working with the updated CH376msc library.
I tried to read a csv (type of Excel) file from flash drive using the library example, but no success.
After i changed the file extension on flash drive to TXT - everything work just great.
A .csv file is actually kind of text file where data is comma delimited.
Why it is not possible to read other files that are not TXT type?
Is there any way that will enable read other file types?
Thanks
The text was updated successfully, but these errors were encountered: