How to write data in columns of xls file

nitin2003

Client
Joined
Sep 18, 2012
Messages
195
Reaction score
11
Points
18
Hi,

How can I write my final result in an excel file?
e.g. if I scraped 10 fields from a site, now I want to save these 10 fields as 1 column each in an excel file so that my excel file will have multiple rows with 10 columns?

I tried by writing it to a table and then writing that table to a file but I am stuck at the point where I add a line into a table. What separator do I have to give to make it write in multiple columns?

Thanks
Nitin
 

rostonix

Известная личность
Joined
Dec 23, 2011
Messages
29,068
Reaction score
5,725
Points
113
Standard separator for excel tables should be {-String.Tab-}
 

nitin2003

Client
Joined
Sep 18, 2012
Messages
195
Reaction score
11
Points
18
I think I am making an error here. Whenever I try to write to excel, it doesn't write anything.
I create a 'Write to file' task and wrote {-Variable.Url-}{-String.Tab-}{-Variable.Category-}
But, it didn't write anything in excel. Excel file shows size as 435kb but when I open it, it gives me an error.

Can someone help me with a demo for the same?

Thanks in advance.
 

bigcajones

Client
Joined
Feb 9, 2011
Messages
1,228
Reaction score
685
Points
113
  • Thank you
Reactions: nitin2003

nitin2003

Client
Joined
Sep 18, 2012
Messages
195
Reaction score
11
Points
18
Thanks bigcajones.
Actually, I tried this way too and when I write the table content using Table processing task in a file. File size increases but there is no data in the file.
Not sure, what exactly is wrong with my file writing. it works fine in .txt files.

Thanks

 

nitin2003

Client
Joined
Sep 18, 2012
Messages
195
Reaction score
11
Points
18
Ok. now it worked but only with xls file and not xlsx files. so, I believe my format for xlsx file wasn't correct.
 

bigcajones

Client
Joined
Feb 9, 2011
Messages
1,228
Reaction score
685
Points
113
This should work for xlsx also. If you have problems with it, try using an actual tab from the keyboard in between the variables instead of {-String.Tab-}. I almost always do it that way anyways when working with excel tables.
 
  • Thank you
Reactions: nitin2003

amul

Client
Joined
Jul 2, 2011
Messages
147
Reaction score
10
Points
18
I was just looking into this...

Clint, you rock!
 

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)