Hello all,
I guess this is the right forum for this question as this attempts to unite Excel and Access!
I have developed an application from which I want to export some data to another application. The Other application uses Excel as one of the formats of files from which data can be imported. Consequently my process to export into the other application is:
My app -Export-> Excel -Export-> Other Application.
The format of access tables do not match the format of data in the Other application.
My plan is this:
I create an Excel template with the following tabs:
1) Parameters
2) Data Format
In Parameters I define the location of the folder where I want to create the file. There would be other static parameters which are still getting finalized.
In Data Format Tab I define the following:
1) Fields in my table
2) Description
3) Required Flag (Yes/No)
4) Column Letter in the Excel data File
5) Title of the column.
Through VBA, I open this template file, read the names of each field, whether required or not, column letter and title of the column and the location where to store the file.
Next I open a blank excel file, rename one of the tabs to say "Raw Data". In the first row, I put the Titles of the column. In the second and subsequent rows, based on the Field and the corresponding Column Letters, I load values from my Access Tables to the rows
Of course, there will be intermediate arrays used. before I actually write in the Excel Rows..
My questions are:
1) Has anyone done opening, writing into and reading of specific named tabs in Excel and specific cell contents from within those tabs using VBA from WITHIN ACCESS?
2) Are there any sample codes available where I can look and base my coding on it?
Thank you in advance.
Cheers!
Uttam
=================
I guess this is the right forum for this question as this attempts to unite Excel and Access!
I have developed an application from which I want to export some data to another application. The Other application uses Excel as one of the formats of files from which data can be imported. Consequently my process to export into the other application is:
My app -Export-> Excel -Export-> Other Application.
The format of access tables do not match the format of data in the Other application.
My plan is this:
I create an Excel template with the following tabs:
1) Parameters
2) Data Format
In Parameters I define the location of the folder where I want to create the file. There would be other static parameters which are still getting finalized.
In Data Format Tab I define the following:
1) Fields in my table
2) Description
3) Required Flag (Yes/No)
4) Column Letter in the Excel data File
5) Title of the column.
Through VBA, I open this template file, read the names of each field, whether required or not, column letter and title of the column and the location where to store the file.
Next I open a blank excel file, rename one of the tabs to say "Raw Data". In the first row, I put the Titles of the column. In the second and subsequent rows, based on the Field and the corresponding Column Letters, I load values from my Access Tables to the rows
Of course, there will be intermediate arrays used. before I actually write in the Excel Rows..
My questions are:
1) Has anyone done opening, writing into and reading of specific named tabs in Excel and specific cell contents from within those tabs using VBA from WITHIN ACCESS?
2) Are there any sample codes available where I can look and base my coding on it?
Thank you in advance.
Cheers!
Uttam
=================