Hello I downloaded the xwlt module, but how to write and read from a text to excel for example
3101 Ms. Leanne Jones 278 High Street Blackwood Gwent NP12 2BN United Kingdom 1495225229. this is the data what I have in notepad.
I want to put this data in excel like this.
Sr. No. Title First name Middle Name Last Name Company Job Title Address City State/Province Zip/Postal Code Country Region primary Phone Mobile Phone Email address
Can anyone help me.
read and write from text to excel file
Page 1 of 15 Replies - 531 Views - Last Post: 08 August 2012 - 12:55 PM
Replies To: read and write from text to excel file
#2
Re: read and write from text to excel file
Posted 08 August 2012 - 08:19 AM
Can you show us the code you have so far and a detailed error explaining why it doesn't work.
This post has been edited by atraub: 08 August 2012 - 08:20 AM
#3
Re: read and write from text to excel file
Posted 08 August 2012 - 08:26 AM
So far, I have not started it.
What I did was I used file object and read the file but I don't know how to proceed from there.
Regards,
Shekar
What I did was I used file object and read the file but I don't know how to proceed from there.
Regards,
Shekar
#4
Re: read and write from text to excel file
Posted 08 August 2012 - 09:56 AM
You may write your data into CSV format
A, B, C, D
then use your excel program, import that csv file, then you will get a excel file
CSV http://en.wikipedia....eparated_values
A, B, C, D
then use your excel program, import that csv file, then you will get a excel file
CSV http://en.wikipedia....eparated_values
This post has been edited by atraub: 08 August 2012 - 12:30 PM
Reason for edit:: Changed cvs to csv
#5
Re: read and write from text to excel file
Posted 08 August 2012 - 12:32 PM
Until you show some miniscule attempt at solving it, I will not help you. That would be violating the #1 fundamental rule of Dream In Code. Please, show us something.
This post has been edited by atraub: 08 August 2012 - 12:32 PM
#6
Re: read and write from text to excel file
Posted 08 August 2012 - 12:55 PM
@FamiHug is correct, csv is the easiest way to do this. For each row of data, construct a string containing the values in the order you want them, separated by commas.
Technically, you don't have to use commas, any single character will do, so you might want to use, for example, tabs ("\t") or vertical bars ("|") if there's a chance you'll have commas in your data (for example, in the address field).
It would be wise to ensure that your data fields don't contain your separator character, in any case, because that would cause an annoying misalignment of your data.
But, as Adam says, if you want help with the code you'll have to start by writing it.
Technically, you don't have to use commas, any single character will do, so you might want to use, for example, tabs ("\t") or vertical bars ("|") if there's a chance you'll have commas in your data (for example, in the address field).
It would be wise to ensure that your data fields don't contain your separator character, in any case, because that would cause an annoying misalignment of your data.
But, as Adam says, if you want help with the code you'll have to start by writing it.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|