Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
I create an Excel worksheet in C# (should be similar in VB)
Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; Create string: "CREATE TABLE S1 (Dt date, St char(40), Cr currency)" Works fine, but the worksheet is named _S1 (UNDERSCORE!) and not S1. Why does this happen? Any ideas? Thx HW |
#2
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Hi Horst,
Wild guessing he maybe iit s some sort of reserved word (i think it is afraid of cell naming...). Try with other names - they should work -- Miha Markic - RightHand .NET consulting & development miha at rthand com www.rhand.com "Horst Walter" wrote in message m... I create an Excel worksheet in C# (should be similar in VB) Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; Create string: "CREATE TABLE S1 (Dt date, St char(40), Cr currency)" Works fine, but the worksheet is named _S1 (UNDERSCORE!) and not S1. Why does this happen? Any ideas? Thx HW |
#3
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Hi,
Try to wrap table name into square brackets CREATE TABLE [S1] ... -- Val Mazur Microsoft MVP Check Virus Alert, stay updated http://www.microsoft.com/security/incident/blast.asp "Horst Walter" wrote in message m... I create an Excel worksheet in C# (should be similar in VB) Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; Create string: "CREATE TABLE S1 (Dt date, St char(40), Cr currency)" Works fine, but the worksheet is named _S1 (UNDERSCORE!) and not S1. Why does this happen? Any ideas? Thx HW |
#4
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Hi Val,
"Val Mazur" wrote in message ... Hi, Try to wrap table name into square brackets CREATE TABLE [S1] ... It doesn't work (already tried that :) ). Also parenthesis have no effect... -- Miha Markic - RightHand .NET consulting & development miha at rthand com www.rthand.com |
#5
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Thanks for your answers.
As a matter of fact, the name S1 seems to be the problem. Summary: ======== This works: CREATE TABLE mytable (Dt date, St char(40), Cr currency) CREATE TABLE S1 (Dt date, St char(40), Cr currency) = Worksheet's name will be _S1 CREATE TABLE [S1] (Dt date, St char(40), Cr currency) does not work Google index C# Excel worksheet underscore (Horst Walter) wrote in message om... I create an Excel worksheet in C# (should be similar in VB) Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; Create string: "CREATE TABLE S1 (Dt date, St char(40), Cr currency)" Works fine, but the worksheet is named _S1 (UNDERSCORE!) and not S1. Why does this happen? Any ideas? Thx HW |
#6
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Horst,
Don't mean to jump on on your thread here but I have a question for you. Do you know where I can find documentation for Excel when creating tables using ADO.Net? i.e. - datatypes and general syntax ... Thanks, Rob Panosh "Horst Walter" wrote in message m... I create an Excel worksheet in C# (should be similar in VB) Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; Create string: "CREATE TABLE S1 (Dt date, St char(40), Cr currency)" Works fine, but the worksheet is named _S1 (UNDERSCORE!) and not S1. Why does this happen? Any ideas? Thx HW |
#7
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
On Mon, 5 Jan 2004 07:10:17 -0600, "Rob Panosh"
wrote: ¤ Horst, ¤ ¤ Don't mean to jump on on your thread here but I have a question for you. Do ¤ you know where I can find documentation for Excel when creating tables using ¤ ADO.Net? i.e. - datatypes and general syntax ... ¤ You should be able to use the Jet database provider DDL syntax: HOWTO: Common DDL SQL for the Microsoft Access Database Engine http://support.microsoft.com/default...;EN-US;Q180841 Paul ~~~ Microsoft MVP (Visual Basic) |
#8
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Try this:
http://www.kjmsolutions.com/datasetarray.htm This will write the dataset to an array and then to an excel spreadsheet. Also, solutions like these can be found by using the VB.NET/ADO.NET free search engine tool at http://www.kjmsolutions.com/newsgrouptool.htm "Rob Panosh" wrote in message ... Horst, Don't mean to jump on on your thread here but I have a question for you. Do you know where I can find documentation for Excel when creating tables using ADO.Net? i.e. - datatypes and general syntax ... Thanks, Rob Panosh "Horst Walter" wrote in message m... I create an Excel worksheet in C# (should be similar in VB) Connection String: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";" + "Extended Properties=Excel 8.0;"; Create string: "CREATE TABLE S1 (Dt date, St char(40), Cr currency)" Works fine, but the worksheet is named _S1 (UNDERSCORE!) and not S1. Why does this happen? Any ideas? Thx HW |
#9
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming,microsoft.public.dotnet.framework.adonet
|
|||
|
|||
Create Excel Worksheet in C# / VB
Thanks...
Rob "Paul Clement" wrote in message ... On Mon, 5 Jan 2004 07:10:17 -0600, "Rob Panosh" wrote: ¤ Horst, ¤ ¤ Don't mean to jump on on your thread here but I have a question for you. Do ¤ you know where I can find documentation for Excel when creating tables using ¤ ADO.Net? i.e. - datatypes and general syntax ... ¤ You should be able to use the Jet database provider DDL syntax: HOWTO: Common DDL SQL for the Microsoft Access Database Engine http://support.microsoft.com/default...;EN-US;Q180841 Paul ~~~ Microsoft MVP (Visual Basic) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I create GST worksheet in excel | New Users to Excel | |||
How do I create a worksheet within a worksheet in Excel? | Excel Worksheet Functions | |||
How do I create a Map with an Excel worksheet? | Excel Worksheet Functions | |||
how do i create a path to a worksheet from outside of excel | Excel Discussion (Misc queries) | |||
Create Excel worksheet in .Net | Excel Programming |