Cration date

W

witek

Does anybody have an idea how to read workbook creation date from
current file using Excel API and C++.

Similar to
ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
but using Excel API and C++

Thanks
 
R

ralph

Does anybody have an idea how to read workbook creation date from
current file using Excel API and C++.

Similar to
ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
but using Excel API and C++

Have only seen it done through automation, and have never done it with
Access.
This talks about other office products, but the principle is the same.
http://support.microsoft.com/kb/238393

Roll your C++ code into an ActiveX component (ATL) and call it from
Excel.

If that is all you need, a bit of exploring with a hex editor might
reveal where that property is stored, and with reliable markers a
simple 'file search' might uncover the info. But that is a sheer
guess. I would expect the date to be shrouded a bit in a Date decimal
format.

-ralph
 
W

witek

ralph said:
Have only seen it done through automation, and have never done it with
Access.
This talks about other office products, but the principle is the same.
http://support.microsoft.com/kb/238393

Roll your C++ code into an ActiveX component (ATL) and call it from
Excel.

If that is all you need, a bit of exploring with a hex editor might
reveal where that property is stored, and with reliable markers a
simple 'file search' might uncover the info. But that is a sheer
guess. I would expect the date to be shrouded a bit in a Date decimal
format.

-ralph

my c++ code is an xll addin.
it must be a direct call to Excel API.
Everything else is too slow for me.
I was looking at xlc... commands and I did not find anything useful but
maybe I missed something.
it is hard to find any documentation.
 
R

ralph

my c++ code is an xll addin.
it must be a direct call to Excel API.
Everything else is too slow for me.
I was looking at xlc... commands and I did not find anything useful but
maybe I missed something.
it is hard to find any documentation.

Ok. You can still use Automation inside an XLL, directly or
indirectly. (There is nothing in programming that can't be resolved
with another layer of indirection. <g>)

I just suggested an ActiveX wrapper, because I was thinking Excel VBA
code.

As for 'speed' ... ? Automation is always a tad slow/er than any
direct read. Not sure if it will meet your service requirements, you
just have to test.

Also Automation while it does not require the product to "open", it
does instantiate the ActiveX 'exe'. There can be sharing issues in
some scenarios.

Don't give up yet. The holiday will be over soon. The real gurus will
be showing up. <g>

-ralph
 
W

witek

ralph said:
Ok. You can still use Automation inside an XLL, directly or
indirectly. (There is nothing in programming that can't be resolved
with another layer of indirection. <g>)

I just suggested an ActiveX wrapper, because I was thinking Excel VBA
code.

As for 'speed' ... ? Automation is always a tad slow/er than any
direct read. Not sure if it will meet your service requirements, you
just have to test.

Also Automation while it does not require the product to "open", it
does instantiate the ActiveX 'exe'. There can be sharing issues in
some scenarios.

Don't give up yet. The holiday will be over soon. The real gurus will
be showing up. <g>

-ralph

there are two problems.
1.
speed. Function must be really fast. We are talking about time < 10 ms.
Excel file will be very large > 100 MB, so I can't use any function
which requires opening or reading file from drive.

2.
Excel file must work on any computer without any installation process.
I can't install anything extra or assume that something is installed. It
must work on "fresh" windows + excel installation.

I will try it. Maybe I can use instance of Excel which is already in memory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top