J
jilanis
Sub: Update data in OLE excel sheet with Query or Table. / Export Query/table
to OLE excel sheet
Hi guys.
This place is like heaven to me. I have discovered many solutions to my
problems over the years. I am kinda stuck on this one and I can't find the
solution specific to my scenario.
I am not a brainy programmer. I can only copy and paste the code if some one
could tell me where to paste it (e.g on form-load or on command-click).
If I give you little explanation, could you please help me out! Thanks in
advance.
I have a table and a query:
tblExcel
qryData
In "tblExcel" I have an OLE object field called oleSummary. I have saved the
template excel file (Analysis.xls) in this OLE field. There are two sheets
in this excel file: one is RawDataSheet and other one "Analysis_Sheet", The
Analysis_Sheet have charts and formula based on data saved in RawDataSheet.
Right now I have to manually copy my data from qryData and paste it on the
Analysis.xls in OLE field so that I can view its summary/analysis in
"Analysis_Sheet".
I have a command button on frmMain that opens my "Analysis.xls" through
oleSummary bound object on the form.
Now what I want is to automate this process. I want automatically update
RawDataSheet in my OLE excel file with my qryData when I open the excel file
through frmMain (command click).
I have seen some codes but that only work if you know path of the excel file.
I do not want to use paths like c:\...path..\ .... because I want to keep
everything together in one database.
I hope this make sense.
Thanks ever so much in advance.
Regards
jilanis
to OLE excel sheet
Hi guys.
This place is like heaven to me. I have discovered many solutions to my
problems over the years. I am kinda stuck on this one and I can't find the
solution specific to my scenario.
I am not a brainy programmer. I can only copy and paste the code if some one
could tell me where to paste it (e.g on form-load or on command-click).
If I give you little explanation, could you please help me out! Thanks in
advance.
I have a table and a query:
tblExcel
qryData
In "tblExcel" I have an OLE object field called oleSummary. I have saved the
template excel file (Analysis.xls) in this OLE field. There are two sheets
in this excel file: one is RawDataSheet and other one "Analysis_Sheet", The
Analysis_Sheet have charts and formula based on data saved in RawDataSheet.
Right now I have to manually copy my data from qryData and paste it on the
Analysis.xls in OLE field so that I can view its summary/analysis in
"Analysis_Sheet".
I have a command button on frmMain that opens my "Analysis.xls" through
oleSummary bound object on the form.
Now what I want is to automate this process. I want automatically update
RawDataSheet in my OLE excel file with my qryData when I open the excel file
through frmMain (command click).
I have seen some codes but that only work if you know path of the excel file.
I do not want to use paths like c:\...path..\ .... because I want to keep
everything together in one database.
I hope this make sense.
Thanks ever so much in advance.
Regards
jilanis