Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Adding/Removing worksheets through SQL (Read 2927 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Adding/Removing worksheets through SQL
12.02.08 at 22:23:49
Adding/Removing worksheets through SQL
Adding a new worksheet to a workbook - adding a new tab - can be achieved using SQL. Connect to your workbook through the Microsoft Jet OLEDB provider. Then use the following SQL commands:
To create a new worksheet called GJL with 3 columns e.g.:
create table mytable(a number,d date,v varchar(200) );
To remove the worksheet:
drop table mytable;
Adding new data to the worksheet
insert into mytable (a,d,v) values (1,'1/1/2000','hello world')
Removing data - executing delete commands - is not supported.  You can remove the whole worksheet (table) however and start over.
Back to top

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1