Sep 12th, 2005, 09:21 AM
#1
Thread Starter
Hyperactive Member
Excel Spreadsheet
Please guide, how to convert a table in Sql Server 2000 to an Excel Spreadsheet programitically? I am coding in c#. Thanks a bunch.
Sep 12th, 2005, 09:35 AM
#2
Re: Excel Spreadsheet
You can use ADO.NET at both ends. System.Data.SqlClient for SQL Server and OleDb for Excel. Check www.connectionstrings.com for the correct connection string for Excel. You use SQL statements for Excel just like any other database, except that you use sheet names, sheet names with cell ranges or named cell ranges in place of table names. Check MSDN for details.
Sep 12th, 2005, 09:41 AM
#3
Re: Excel Spreadsheet
You can search VBForums too. I have several posts using ADO and VB6 but they are similar in the logic and syntax shouldnt be hard to convert.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Sep 12th, 2005, 10:58 AM
#4
Thread Starter
Hyperactive Member
Re: Excel Spreadsheet
Shall MS Excel be loaded on the server? Is there any way to convert, if the Ecel is not loaded on the server?
Sep 12th, 2005, 11:01 AM
#5
Re: Excel Spreadsheet
No you dont need it on the server if your running the your converting app on a client pc with Excel installed.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Sep 12th, 2005, 11:46 AM
#6
Thread Starter
Hyperactive Member
Re: Excel Spreadsheet
I am working on an asp.net application with c# as codebehind. So the code code runs on the server side. So, I guess, I would be needing MS Excel on the server.
Sep 12th, 2005, 11:53 AM
#7
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Sep 12th, 2005, 11:11 PM
#8
Frenzied Member
Re: Excel Spreadsheet
Really? Aren't there an excel redistributable, so you don't have to install excel on the machine your code is running on?
Sep 12th, 2005, 11:13 PM
#9
Re: Excel Spreadsheet
Nope, Office apps are not redistributable. You need to purchase a license for each instance of it that you need installed.
There is an Excel Viewer utility by MS that allows a user that doesnt have Excel to "view" a workbook, but I am 99% sure your cant program against it.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Sep 12th, 2005, 11:18 PM
#10
Frenzied Member
Re: Excel Spreadsheet
I'm a bit brain-dead and stressed out, preparing for phone interview with the technical team for a job I would like to get, so scuse any stupidity...
What about the office web control? you can create an application that uses that control, and then install it on many machines, whether they got Office installed or not. Or am I wrong (because then I got an ex-employer who I should take of my resume!!)
I know this is not really in the line of what you asked Sinha, so sorry for barging in your thread, but I'm just curious.
Sep 12th, 2005, 11:24 PM
#11
Re: Excel Spreadsheet
To be honest, I have not used it much and its only been experimental, no deployment. The web controls only are available to the developer if they have Office installed but for deployment? I would say a tough search on MS would be required but I'm not up to that tonight either.
Ps, good luck on the interview.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Sep 12th, 2005, 11:40 PM
#12
Re: Excel Spreadsheet
Just thought I'd point this out. Something I stumbled across.
Note: the warning message.
Ps, I edited out my product ID and licensed to.
Attached Images
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Sep 13th, 2005, 07:08 AM
#13
Re: Excel Spreadsheet
Originally Posted by
RobDog888
Nope, Office apps are not redistributable. You need to purchase a license for each instance of it that you need installed.
There is an Excel Viewer utility by MS that allows a user that doesnt have Excel to "view" a workbook, but I am 99% sure your cant program against it.
Make that 100% - you can't.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width