locked
How to insert the data into Excel from Access using VB? RRS feed

  • Question

  • User1561147526 posted

    Here my question is i want to store the data from Access table to  excel sheet.

    I know the conventional method i.e

    creating objects for excel.application;excel.workbook;excel.worksheet;

    but this can be happen only when the user  has installed  EXCEL in his machine.We should not force him to install it.

    irrespective of the installation i want to store the data into EXCEL.

    Please give me some idea......

    Friday, May 9, 2008 10:39 AM

Answers

  • User-821857111 posted

    The conventional method you refer to wouldn't require the user to have Excel on their machine, as ASP.NET runs on the web server, so Excel would need to be installed there.  But the user wuold need Excel Viewer at least, otherwise they would not be able to do anything with the resulting Excel file.

    Anyway, writing data to an Excel file is almost exactly the same as writing it to Access.  You would use an OleDbConnection and OleDbCommand and the Jet Provider.  Here's some samples in VB: http://www.beansoftware.com/NET-Tutorials/Excel-ADO.NET-Database.aspx

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 9, 2008 4:09 PM