R
Rollasoc
Hi,
I have an application, that needs to import excel spreadsheets into a
SQL Server
database.
I am using an OleDBDataAdapter to load (fill) the data into a
Dataset.
This works fine, when the spreadsheet is formatted correctly.
Occasionally, person sending us the file, will put the data starting
in column B, not column A. This fails our checks on column count.
They also have started in the third row, which messes up the column
headings. I Get F1 -F6 for the
column headers and only three of the six actual column heading are
read in (as data). The other three
column headings are read in as blanks.
Also occasionally, an extra blank column after the data gets read
in. Well it looks blank in the spreasheet, but I'm assuming they have
done something to it.
Is there an easy way for me to get the DataAdapter to ignore blank
columns and rows?
At the moment, I'm (in my opinion) quite rightly rejecting the file,
but I would like my application to
be more fault tolerant and intellegent.
Rollasoc
I have an application, that needs to import excel spreadsheets into a
SQL Server
database.
I am using an OleDBDataAdapter to load (fill) the data into a
Dataset.
This works fine, when the spreadsheet is formatted correctly.
Occasionally, person sending us the file, will put the data starting
in column B, not column A. This fails our checks on column count.
They also have started in the third row, which messes up the column
headings. I Get F1 -F6 for the
column headers and only three of the six actual column heading are
read in (as data). The other three
column headings are read in as blanks.
Also occasionally, an extra blank column after the data gets read
in. Well it looks blank in the spreasheet, but I'm assuming they have
done something to it.
Is there an easy way for me to get the DataAdapter to ignore blank
columns and rows?
At the moment, I'm (in my opinion) quite rightly rejecting the file,
but I would like my application to
be more fault tolerant and intellegent.
Rollasoc