| | |
how to create csv file
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
You cannot write directly to an *.xls file and expect Excel to read it because *.xls files are not plain text files -- they contain a lot of formatting information that is readable only by Excel program.
The easiest way to do it is to creates *.csv files which Excel can import. Fieids (cells) are commma or sometimes tab separated, with CR/LF between each row. Using your example you might write it like this: Text should be surrounded with quotes (see first example below)
Python Syntax (Toggle Plain Text)
myfile << "\"Hello World\"," << nums[1] << "," << nums[2] << "," nums[3] << "\n"; or myfile << nums[1] << "\t" << nums[2] << "\t" nums[3] << "\n";
Here in writing excel file I have an script which I used in writing it but while reading it using another script for excel it generates an error as mentioned below:-
"The filename shipaccountactivity1.xls is not readable"
Can u plz help me in above case as how can I write it so that it can easily be readable.......
Thanks in advance.....
•
•
Join Date: Jan 2008
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
Do you mean you are using an html editor to write the csv file? Then why is this question in the C board?
So much thanx........
![]() |
Similar Threads
- create pdf or word file from within c# (C#)
- write and delete details on csv file in C++ (C++)
- Parsing CSV file in partcular format (Java)
- Reading in certain columns from CSV files into array C++ (C++)
- Macros & VB to create various letters (Visual Basic 4 / 5 / 6)
- html table to .csv (HTML and CSS)
Other Threads in the Python Forum
- Previous Thread: wxPython
- Next Thread: File Sharing System
Views: 4246 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Python
accessdenied address ansi backend beginner changecolor class code conversion coordinates copy curves customdialog dan08 dictionary directory dynamic edit examples excel feet file float font format ftp function generator getvalue gui halp homework i/o images import info input ip java line linux list lists loop mouse mysql newb number numbers output panel parsing path port prime print program programming projects py2exe pygame pyqt python queue random rational recursion recursive schedule screensaverloopinactive scrolledtext searchingfile server ssh stamp statictext string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial type ubuntu unicode url urllib urllib2 variable whileloop windows write wxpython






