fjsen
asked on
Saving custom data in excel
Hello:
I need to write custom data in an excel workbook. I think the best option is to save them in the CustomProperties collection. Is this OK?
I need to use excel from a VC++ 6.0 application.
These are my questions:
1- I get a compiler error when trying to access to "Type" property of a "Office::DocumentPropertyP tr" pointer. I'm using the following lines to use Excel automation in StdAfx.h:
#import "MSO9.DLL"
#import "VBE6EXT.OLB"
#import "EXCEL9.OLB" \
rename("DialogBox","_Dialo gBox") \
rename("RGB","_RGB") \
exclude("IFont","IPicture" )
I've solved that compiler error renaming the line
#pragma implementation_key(684)
inline enum MsoDocProperties Office::DocumentProperty:: GetType ( long lcid ) {
enum MsoDocProperties _result;
HRESULT _hr = get_Type(lcid, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
to
#pragma implementation_key(684)
inline enum Office::MsoDocProperties Office::DocumentProperty:: GetType ( long lcid ) {
enum MsoDocProperties _result;
HRESULT _hr = get_Type(lcid, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
in MSO9.tli. How can I avoid this manual renaming operation?
2- When I acces to the Custom document properties with this code:
Office::DocumentProperties Ptr pProps= pWorkbook->CustomDocumentP roperties;
I get a null pointer. How can I access to the custom properties of the workbook?
Thanks in advance,
Jose.
I need to write custom data in an excel workbook. I think the best option is to save them in the CustomProperties collection. Is this OK?
I need to use excel from a VC++ 6.0 application.
These are my questions:
1- I get a compiler error when trying to access to "Type" property of a "Office::DocumentPropertyP
#import "MSO9.DLL"
#import "VBE6EXT.OLB"
#import "EXCEL9.OLB" \
rename("DialogBox","_Dialo
rename("RGB","_RGB") \
exclude("IFont","IPicture"
I've solved that compiler error renaming the line
#pragma implementation_key(684)
inline enum MsoDocProperties Office::DocumentProperty::
enum MsoDocProperties _result;
HRESULT _hr = get_Type(lcid, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
to
#pragma implementation_key(684)
inline enum Office::MsoDocProperties Office::DocumentProperty::
enum MsoDocProperties _result;
HRESULT _hr = get_Type(lcid, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
in MSO9.tli. How can I avoid this manual renaming operation?
2- When I acces to the Custom document properties with this code:
Office::DocumentProperties
I get a null pointer. How can I access to the custom properties of the workbook?
Thanks in advance,
Jose.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Does anybody know the answer to the second question?
Thanks in advance,
Jose.
Thanks in advance,
Jose.
better put a link to this in the C++ section
https://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/
:O)Bruintje
https://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/
:O)Bruintje
Hello fjsen
this question is open for more then 2 months
time to clean up
if not stated otherwise
my recom will be
-PAQ and refund
-this will be finalized by an EE Moderator
-with no further update (11.09.2002)
PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER
HAGD:O)Bruintje
posted by ToolzEE v1.0
this question is open for more then 2 months
time to clean up
if not stated otherwise
my recom will be
-PAQ and refund
-this will be finalized by an EE Moderator
-with no further update (11.09.2002)
PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER
HAGD:O)Bruintje
posted by ToolzEE v1.0
any luck with the info out those links?, please give some feedback or we can try something else
like installing VC++ here ;)
Brian