2 Replies - 16247 Views - Last Post: 19 January 2007 - 08:03 AM Rate Topic: -----

#1 Darigon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-January 07

Setting CSV Column Width?

Posted 19 January 2007 - 02:08 AM

I have writing a script that writes SMS data to a CSV file, but when you open the file in excel the columns are all the same width and the data in the columns are condensed.

i.e. Mobile Numbers are: 2.78E+10 and Dates are ########

Is there a way when using fwrite to set the column width?
Any input would be most welcome,

Thanks
Darigon
Is This A Good Question/Topic? 0
  • +

Replies To: Setting CSV Column Width?

#2 Darigon  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-January 07

Re: Setting CSV Column Width?

Posted 19 January 2007 - 06:39 AM

I found a way around it.
Entered the data into a xml file in an excel format and could then save the column widths. But this made the file size ALOT larger so I had to figure out how to zip the file and offer it to the client for downloading...

Thanks anyways,
Darigon
Was This Post Helpful? 0
  • +
  • -

#3 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Setting CSV Column Width?

Posted 19 January 2007 - 08:03 AM

CSV just stores data, not how it is suppose to be displayed. The only thing special about them is that columns are separated by a delimiter (generally commas) and rows by newlines.

You can read a more indepth explaination here.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1