Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Making a date go red, if date passes todays date. | Excel Worksheet Functions | |||
Report Date - Date Recv = Days Late, but how to rid completed date | Excel Worksheet Functions | |||
copy date based on date -refer to date range | Excel Programming | |||
Date updates from worksheet to chart & changes date to a date series! Help!! | Charts and Charting in Excel |