Click here to Skip to main content
15,898,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Read data from MS Excel Pin
Dave Kreskowiak3-May-10 5:09
mveDave Kreskowiak3-May-10 5:09 
AnswerRe: Read data from MS Excel Pin
Wayne Gaylard30-Apr-10 4:05
professionalWayne Gaylard30-Apr-10 4:05 
GeneralRe: Read data from MS Excel Pin
nishkarsh_k2-May-10 20:28
nishkarsh_k2-May-10 20:28 
GeneralRe: Read data from MS Excel [modified] Pin
nishkarsh_k2-May-10 23:37
nishkarsh_k2-May-10 23:37 
GeneralRe: Read data from MS Excel Pin
Wayne Gaylard3-May-10 0:07
professionalWayne Gaylard3-May-10 0:07 
GeneralRe: Read data from MS Excel Pin
nishkarsh_k3-May-10 2:08
nishkarsh_k3-May-10 2:08 
GeneralRe: Read data from MS Excel Pin
nishkarsh_k4-May-10 3:27
nishkarsh_k4-May-10 3:27 
GeneralRe: Read data from MS Excel Pin
Wayne Gaylard4-May-10 20:44
professionalWayne Gaylard4-May-10 20:44 
Hi Nishkarsh

I am afraid the library is only for generating reports, and cannot read Excel spreadsheets. The only way I know of reading Excel spreadsheets without Excel installed on the machine is by using ADO.Net and connecting to the spreadsheet like a database. Unfortunately, I have never used this method and can't give any advice. As the file generated by CarlosAg library is in Spreadsheet XML format, what I do is if I want to read or add to the file, I treat it as a purely XML file and then do my business with XML.

As far as saving the file generated, the format of the generated file is Spreadsheet XML, but you can save this as an .xls file and Excel opens this file without an issue, just warning you that the file format is not correct the first time you open it. If you ignore that and open it, then you can save as any format you like from Excel itself. What I normally do is use a FileSaveDialog to get the user to select the name of the file and I use a filter to make sure it only selects .xls files like this :
VB.NET
Dim sfdReport As New SaveFileDialog
sfdReport.Filter = "Excel Files (*.xls)|*.xls"
sfdReport.ShowDialog()
book.save(sfdReport.FileName)


That way the file is only saved as .xls.

Happy Coding
GeneralRe: Read data from MS Excel Pin
nishkarsh_k5-May-10 0:28
nishkarsh_k5-May-10 0:28 
GeneralRe: Read data from MS Excel Pin
Wayne Gaylard5-May-10 1:41
professionalWayne Gaylard5-May-10 1:41 
GeneralRe: Read data from MS Excel Pin
nishkarsh_k6-May-10 19:53
nishkarsh_k6-May-10 19:53 
GeneralRe: Read data from MS Excel Pin
nishkarsh_k16-May-10 4:11
nishkarsh_k16-May-10 4:11 
GeneralRe: Read data from MS Excel Pin
nishkarsh_k17-Aug-10 2:36
nishkarsh_k17-Aug-10 2:36 
QuestionNaming Convention Pin
programmervb.netc++30-Apr-10 0:58
programmervb.netc++30-Apr-10 0:58 
AnswerRe: Naming Convention Pin
Eddy Vluggen30-Apr-10 1:12
professionalEddy Vluggen30-Apr-10 1:12 
GeneralRe: Naming Convention Pin
programmervb.netc++30-Apr-10 4:27
programmervb.netc++30-Apr-10 4:27 
GeneralRe: Naming Convention Pin
Eddy Vluggen30-Apr-10 4:54
professionalEddy Vluggen30-Apr-10 4:54 
AnswerRe: Naming Convention Pin
DaveAuld30-Apr-10 1:20
professionalDaveAuld30-Apr-10 1:20 
AnswerRe: Naming Convention Pin
fjdiewornncalwe30-Apr-10 3:22
professionalfjdiewornncalwe30-Apr-10 3:22 
QuestionResponse.End not working in ActiveX DLL Pin
neil.stevens29-Apr-10 22:22
neil.stevens29-Apr-10 22:22 
QuestionEvent implementation and autocomplete handler signature with Visual Studio 2008 Pin
hoernchenmeister29-Apr-10 20:30
hoernchenmeister29-Apr-10 20:30 
AnswerRe: Event implementation and autocomplete handler signature with Visual Studio 2008 Pin
Dave Kreskowiak30-Apr-10 3:37
mveDave Kreskowiak30-Apr-10 3:37 
GeneralRe: Event implementation and autocomplete handler signature with Visual Studio 2008 Pin
hoernchenmeister2-May-10 20:40
hoernchenmeister2-May-10 20:40 
GeneralRe: Event implementation and autocomplete handler signature with Visual Studio 2008 Pin
Dave Kreskowiak3-May-10 2:07
mveDave Kreskowiak3-May-10 2:07 
GeneralRe: Event implementation and autocomplete handler signature with Visual Studio 2008 Pin
hoernchenmeister3-May-10 2:36
hoernchenmeister3-May-10 2:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.