Saving

  • Thread starter Thread starter karim
  • Start date Start date
K

karim

Hello All,
I have a simple app, 1 button and 3 text boxes. the button is a save
button. when I save to a file, it save every thing to a (.txt) file. now if I
want to save to an excel sheet, I just change it to (.xls). when I do that it
saves every thing under A1, A2, A3,...etc. how can I get each box I have to
go to a certain block in the excel sheet? like A1, B2, C3...

Thanks for all your help...
 
AFAIK : There are 2 ways you can acomplish this

1. Office Automation , however then the end user must have as working
version of office installed on his system

2. create a HTML table in code input all your values in the required rows
/ columns and save the result as a text file with the extension XLS

HTH

Michel Posseth
 
Hello All,
     I have a simple app, 1 button and 3 text boxes. the button is a save
button. when I save to a file, it save every thing to a (.txt) file. now if I
want to save to an excel sheet, I just change it to (.xls). when I do that it
saves every thing under A1, A2, A3,...etc. how can I get each box I have to
go to a certain block in the excel sheet? like A1, B2, C3...

Thanks for all your help...

I think you need to use Excel Interop by referencing "Microsoft Excel
1x.0 Object Library", however installing PIAs(Primary Interop
Assemblies) are said as recommended way.

Plus, you can create Excel spreadshet using OleDB namepsace, you can
search Google and CodeProject for similar results.

Hope this helps,

Onur Güzel
 
I think you could save it as a ".csv" file with the values separated by
commas (Comma Seperated Values). Excel can open such a file.

Bob
 
Back
Top