View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Number of columns available in a worksheet

Take a look at this file:

http://www.jlathamsite.com/uploads/C...SVFiles_v1.xls

Expect a "contains macros" alert - they are definitely there.

What that file allows you to do is to type in information across sheets as
if they were one hugely wide sheet (as you might find in Excel 2007). So, in
effect, cell A1 on Sheet2 is simply an extension of row one from Sheet1 and
cell A1 would be another extension of that same row.

It allows you to provide a destination folder and filename for the created
file and will allow you to alter the default .csv file parameters such as the
actual field delimiter (default is comma), and the text string enclosing
characters (default is " )

Given the defaults, it follows the rules that Excel does when converting a
sheet to a .csv file:
an entry like "hello"
ends up in the file as """hello"""
and an entry like hello " world
would end up like hello "" world
an entry such as hello, world
will end up as "hello, world"

It follows the same rules for non-standard options also, but I'm not
positive those are the way things should be if non-standard options are used.

CAVEAT: to be reliable, it really needs entries in all cells in row 1 of all
columns that will contain data. Basically it needs a header row to
accurately determine where the data ends in the sheets. If it hits an empty
cell in row 1 before reaching the real end, it thinks that empty cell marks
the end of data.

I still don't know what's in those cells you didn't mention, like B, C and
D, but it's going to be expecting some kind of data in them to finish out
things.

You could always provide dummy headers in the Excel sheets and then use
Notepad or Wordpad to remove that first record from the created .csv file, I
suppose.

Sheets need to be in sequence, 'left to right' as indicated by their tab
positions to work properly. In a default workbook 'Sheet1' would have
columns 1-256, 'Sheet2' would have columns 257-512; 'Sheet3' then has columns
513-768, etc, etc. You can add sheets as required.

"mikecupertino" wrote:

Thanks for the reply. I'm not sure if this will solve my problem. I need to
create a .csv file with more than 256 entries per line. Obviously, I can
convert a spreadsheet to .csv format easily, but since the spreadsheet has
only 256 columns, I don't know how to create a .csv file with more than 256
entries per line.

Mikecupertino

"JLatham" wrote:

I don't know if this is a possible solution for you or not, but I have a .xls
file that will read from a .csv-like file that has more than 256 columns of
information to bring in and fit it across several worksheets. Picture it
like columns 1-256 on sheet1 and then 257-512 on sheet2, 512-768 on sheet3
and on and on. Any given row just extends across the sheets as if you laid
them out side by side. It will basically automatically use as many sheets as
necessary to get your data. The regular pre-Excel 2007 limitation of 65536
rows still applies.

But I'm not sure how that will help you in any downstream processing - that
would have to be aware of the layout of the data across the sheets. But you
can take a look at it:
http://www.jlathamsite.com/uploads/I...umnsOfData.xls


"mikecupertino" wrote:

Hello all:

I am using a software package the input for which is multiple periods of
data (mutual fund returns). For some reason, the program is set up so that
columns represent time periods instead of rows. For example, for fund A,
period 1 is column d, period 2 is column e, etc.

Because of the number of columns allowed in excel 2003, I am limited to
about 250 data points; I would like to have more. Is there any way to
increase the number of columns in a worksheet? Does excel 2007 allow for more
columns? If so, how many?

Thanks in advance for your help.

Mikecupertino