Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Cration date

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







  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cration date

On Tue, 01 Jan 2013 21:01:10 -0600, witek
wrote:

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

Similar to
ActiveWorkbook.BuiltinDocumentProperties("Creatio n 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Cration date

ralph wrote:
On Tue, 01 Jan 2013 21:01:10 -0600, witek
wrote:

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


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.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cration date

On Tue, 01 Jan 2013 21:45:28 -0600, witek
wrote:


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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Cration date

ralph wrote:
On Tue, 01 Jan 2013 21:45:28 -0600, witek
wrote:


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


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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Making a date go red, if date passes todays date. Jamie Excel Worksheet Functions 2 September 9th 08 02:14 PM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
copy date based on date -refer to date range mindpeace[_4_] Excel Programming 1 June 3rd 06 01:30 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"