Csv reader for mac free download - ABBYY FineReader Pro for Mac Upgrade, Haihaisoft Reader (Mac), Cisdem Document Reader, and many more programs. You can import data in to Excel for Mac from a.CSV,.HTML, or.TXT file. Import data from a CSV, HTML, or text file. In the Choose a File dialog box, locate and click the CSV, HTML, or text file that you want to use as an external data range, and then click Get Data.
Jan 03, 2014 All in all, CSV Reader is a very simple piece of software, yet it proves to be useful to people only interested in viewing CSV documents.
![]()
Advertisement
Csv Reader For Windows 10
Csv Reader For Windows 10
Active6 years, 5 months ago
I developed some code on my Mac, using Wing IDE. The code i developed, which makes use of the csv module, is working, and does what I want it to on my Mac. The problem, though, is that the person I wrote it for needs to use it on Windows. I wasn't concerned about the code, as I'm not using any escape characters.
The code looks like this:
The 'arrow' I put in above is where the error is returned at, on the Windows machine. Like I said, the code works fine on the Mac and, actually, this is pretty far down in the code that I have written. There are other CSV files read from and written to above this statement, which use similar indexing.
I would really appreciate any ideas anybody might have regarding this issue! Thanks!
cwallenpoole
62.5k1919 gold badges106106 silver badges149149 bronze badges
DMMLDMML
Adobe Reader For Mac
83733 gold badges1717 silver badges3535 bronze badges
3 Answers
In Python 2
You need to open the file as a binary file:
In Python 3
You need to set newline=' in your open statement:
shellstershellster
From the docs
csv.reader should be passed a file opened in binary mode.I.e.:
Without seeing the input file that causes the problem I can't be sure this will fix the problem, but it is likely to cause other bugs.
Peter GrahamPeter Graham
6,30866 gold badges3232 silver badges3939 bronze badges
Pdf Reader For Mac Yosemite
I can see two potential issues. First, you should be opening the file in binary mode:
Second, you may be dealing with having two different end of lines for two different OS's. You can avoid this by adding
U after the mode:
I also suggest protecting your users from bad data by testing the row. This makes the end result:
cwallenpoolecwallenpoole
62.5k1919 gold badges106106 silver badges149149 bronze badges
Not the answer you're looking for? Browse other questions tagged pythonwindowsmacoscsvindexing or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |