From: johnstubbe on 15 Mar 2010 09:53 Hi, This is my first attempt at using VB6 to export an excel file. The Microsoft Excel Object Library that I apparently need is missing from my Available References in the IDE. I thought that I might need to have Excel installed on my computer. I Googled for Excel. The best I was able to find was MS Office Excel Viewer 2003, which I installed and am able to view Excel files. Still no IDE reference to Excel. I hope it's not necessary to buy Excel since I don't use Excel. Thanks, John
From: Bob Butler on 15 Mar 2010 10:48 "johnstubbe" <johnstubbe(a)frontiernet.net> wrote in message news:6679d134-63b7-45ab-9fd6-3bf924af7c8c(a)g19g2000yqe.googlegroups.com... > Hi, > > This is my first attempt at using VB6 to export an excel file. > The Microsoft Excel Object Library that I apparently need is > missing from my Available References in the IDE. > > I thought that I might need to have Excel installed on my computer. I > Googled for Excel. The best I was able to find was MS Office Excel > Viewer 2003, which I installed and am able to view Excel files. Still > no IDE reference to Excel. > > I hope it's not necessary to buy Excel since I don't use Excel. yes, if you want to reference Excel from VB then you are using Excel and you need to buy and install it. You could create a CSV file, or some other format that Excel recognizes, from VB with straight file I/O but in order to reference and automate Excel you need to have Excel.
From: Tom Shelton on 15 Mar 2010 10:53 On 2010-03-15, johnstubbe <johnstubbe(a)frontiernet.net> wrote: > Hi, > > This is my first attempt at using VB6 to export an excel file. > The Microsoft Excel Object Library that I apparently need is > missing from my Available References in the IDE. > > I thought that I might need to have Excel installed on my computer. I > Googled for Excel. The best I was able to find was MS Office Excel > Viewer 2003, which I installed and am able to view Excel files. Still > no IDE reference to Excel. > > I hope it's not necessary to buy Excel since I don't use Excel. > > Thanks, > John > John... If you are going to use automation, then you WILL need to have excel. The good news is that there is an alternative - SpreadSheetML. Newer versions of office allow you to create and save spread sheets in an xml format. I use this all the time in server scenarios, where I don't want to have office installed. A basic spread sheet looks like: <?xml version="1.0"?> <?mso-application progid="Excel.Sheet"?> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"> <Worksheet ss:Name="Sheet1"> <Table> <Row> <Cell><Data ss:Type="String">a</Data></Cell> <Cell><Data ss:Type="String">b</Data></Cell> </Row> </Table> </Worksheet> </Workbook> This is based on the Office 2003 schemas - which can be freely downloaded here: http://www.microsoft.com/downloads/details.aspx?FamilyID=fe118952-3547-420a-a412-00a2662442d9&displaylang=en I stick to these because they are usable in 2007 as well. 2007's native xml format is very similar, but it is packaged a bit differntly. Basically it is a specially formated zip file with the xml and other resources inside. The nice thing is that my users don't even know that they are gettign xml - I simply lie and return the file with an xls extension rather then xml :) -- Tom Shelton
From: johnstubbe on 15 Mar 2010 18:58 On Mar 15, 10:48 am, "Bob Butler" <no...(a)nospam.ever> wrote: > "johnstubbe" <johnstu...(a)frontiernet.net> wrote in message > > news:6679d134-63b7-45ab-9fd6-3bf924af7c8c(a)g19g2000yqe.googlegroups.com... > > > Hi, > > > This is my first attempt at using VB6 to export an excel file. > > The Microsoft Excel Object Library that I apparently need is > > missing from my Available References in the IDE. > > > I thought that I might need to have Excel installed on my computer. I > > Googled for Excel. The best I was able to find was MS Office Excel > > Viewer 2003, which I installed and am able to view Excel files. Still > > no IDE reference to Excel. > > > I hope it's not necessary to buy Excel since I don't use Excel. > > yes, if you want to reference Excel from VB then you are using Excel and you > need to buy and install it. You could create a CSV file, or some other > format that Excel recognizes, from VB with straight file I/O but in order to > reference and automate Excel you need to have Excel. Thanks, Not what I wanted to here. I have no use for Excel. A customer requested, as a favor, an excel file in place of the standard CSV file. He is not willing to buy me a copy of Excel and I won't. A trial version isn't acceptable due to on going updates to his program. I don't want to use Excel, I just want to export an excel file using VB6, that can be imported into the customers Excel program. I can't afford to spend much time or money on this project.
From: Dave Patrick on 15 Mar 2010 19:09
Download the trial. http://office.microsoft.com/en-us/products/HA101741481033.aspx -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "johnstubbe" wrote: Thanks, Not what I wanted to here. I have no use for Excel. A customer requested, as a favor, an excel file in place of the standard CSV file. He is not willing to buy me a copy of Excel and I won't. A trial version isn't acceptable due to on going updates to his program. I don't want to use Excel, I just want to export an excel file using VB6, that can be imported into the customers Excel program. I can't afford to spend much time or money on this project. |