I'm assembling some data in php to create a csv file which is intended to be opened in MS Excel. There is a possibility that the export can have over 255 columns, so to handle this I would like to be able to "split" it between multiple worksheets...so we have:

first worksheet: 255 columns
second worksheet: 114 columns

So the question here is...is there a special meta character or anything that can be placed within a csv file that can be used to specify a target worksheet for data? From what ive found thus far on the net is that it isn't possible to control target worksheets from a csv file and the only solutions to this problem entails writing client side VB macros to handle the import splitting. Unfortunately, this won't really work for my situation... Anyone have any ideas or thoughts on how to handle this server side? The only thing I can think of at the moment is splitting the CSV export into multiple files that the user would download seperatly and thus open into seperate excel instances

    CSV <> Excell. Excel can open CSV files just fine. But csv does not understand sheets. To do that you have to create excell files.

    Somewhere on the web a class to create xcell files is floating around. Have a search,

    Or tel your clients to start using the 2008 version of office, where excell does not have this limit, afaik.

      Write a Reply...