Home All Groups Group Topic Archive Search About

How to create a new sheet in EXCEL-File via OLEDBProvider

Author
12 May 2006 8:08 AM
Peter Stojkovic
I am importing data from an EXCEL     XLS-File via OLEDB-Provider

The command is SELECT * from [sheet1]


Everything works fine if the first sheet is named sheet1



How can a create a new sheet inside the XLS-File

What command I must program ??

Author
12 May 2006 12:58 PM
Paul Clement
On Fri, 12 May 2006 10:08:40 +0200, "Peter Stojkovic" <d**@gmx.net> wrote:

¤ I am importing data from an EXCEL     XLS-File via OLEDB-Provider
¤
¤ The command is SELECT * from [sheet1]
¤
¤
¤ Everything works fine if the first sheet is named sheet1
¤
¤
¤
¤ How can a create a new sheet inside the XLS-File
¤
¤ What command I must program ??

Open a connection to the Excel Workbook and try using Jet SQL DDL:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acfundsql.asp

Keep in mind there will be some limitations since you're working with an Excel Workbook and not an
Access database.


Paul
~~~~
Microsoft MVP (Visual Basic)