Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 20th, 2006, 10:49 AM
Registered User
Join Date: Sep 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pasing parameters to Spreadsheet

I have a gridview and I want to be able to pass the values from the gridview to an existing excel document. I want to be able to use the Excel object model. So far I have managed to open my existing document but I havent figure out how to pass the values. ANy suggestions? Thank you

 protected void BtnAnalysis_Click(object sender, EventArgs e)
        Microsoft.Office.Interop.Excel.Application m_objExcel;
        Microsoft.Office.Interop.Excel._Workbook m_objBook;
        Microsoft.Office.Interop.Excel.Workbooks m_objBooks;
        Microsoft.Office.Interop.Excel.Sheets m_objSheets;
        Microsoft.Office.Interop.Excel._Worksheet m_objSheet;
        Microsoft.Office.Interop.Excel.Worksheets ExcelWorkSheets;
        Microsoft.Office.Interop.Excel.Font m_objFont;

        m_objOpt = System.Reflection.Missing.Value;
        m_objExcel = new Microsoft.Office.Interop.Excel.Application();
        m_objBooks = (Microsoft.Office.Interop.Excel.Workbooks)m_objExc el.Workbooks;
        m_objBook = (Microsoft.Office.Interop.Excel.Workbook)(m_objBoo ks.Add(m_objOpt));
        m_objExcel.Visible = true;

        string workbookPath = "c:/BillingAnalysis.xls";
        m_objBook = m_objExcel.Workbooks.Open(workbookPath,
            0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindow s, "",
            true, false, 0, true, false, false);


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Spreadsheet Help SteveV VBScript 0 October 10th, 2006 04:42 PM
Excel Spreadsheet Help SteveV BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 October 10th, 2006 04:41 PM
Excel Spreadsheet Help SteveV BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 October 10th, 2006 04:40 PM
Pasing parameters to Spreadsheet Azhavee grajeda Access VBA 2 September 22nd, 2006 11:15 PM
Export a spreadsheet Corey Access 0 November 22nd, 2005 03:42 PM

All times are GMT -4. The time now is 07:02 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.