Excel 2007 - Generate and Excel from Another

[Closed]
Report
-
 Ray -
Hi,

I have been stuck with this problem for a bit.

The problem is - I am sending this excel file to my customers to fill in the bare minimum information required by my database. Now, before submitting the Excel, I need to generate another Excel with all the fields required by the database (which is more than the bare minimum fields I asked for from my customer). Now, I have default values ready for these extra fields. All I want is a script that takes the first excel as an input and automatically generate the other excel with all the default fields as well.

For example,

From my Customer, I get back the following columns -

AAAA BBBB DDDD FFFF
1111 2222 3333 4444

My final Excel has to look like this:

AAAA BBBB CCCC DDDD EEEE FFFF
1111 2222 0000 3333 0000 4444


One of the solution seems to be to link up the new Excel with the customer copy and a default template. But this is not automatic. Please recommend how it can be done through a script that can run on the desktop and convert all my customer excels individually into this format.

Thanks a lot for your help!

Cheers
Videh

1 reply

Doesthis have to be done using Excel?
What database are you using?
There are t-sql commands in Microsoft SQL Server ,OPENROWSET for example, that can read an Excel spreadsheet as if it were a table.