Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to import data from two table from SQL Server into a single excel sheet?
Posted
Comments
Sergey Alexandrovich Kryukov 11-Sep-13 11:11am    
http://whathaveyoutried.com? Why it seems to be a problem?
—SA
Sergey Alexandrovich Kryukov 11-Sep-13 11:18am    
And this is not "import", this is "export"... :-)
—SA
Aboobakkar Siddeq D U 12-Sep-13 1:00am    
ok thanks a lot for your information, i'm a fresher so i don't know much about development. Please tell me how to Export data from 2 table into a single excel sheet at a time?

1 solution

First of all, you should understand that this is not a problem at all: as you don't need to support the tables in an Excel sheet and only need the export, you can place any number of tables on the single sheet: each table have a finite size, so you can put, say, two table in different location of the sheet. If you, say, shift second table on the right of the first one, you can even grow them later, as the tables have fixed number of rows.

For creation of the Excel files, you can either use Microsoft Word interop (it requires Excel to be installed) or Open XML SDK:
http://en.wikipedia.org/wiki/Open_XML[^].

As you did not share information on your programming language, platform and other detail, that's all.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900