Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a DLL that uses Microsoft Excel C API to modify data in Excel
documents. It's an old DLL developed 6-7 years ago that needs to get a few fixes. It compiles in Visual C++ 6. I have Excel documents where the cells have formulas getting values that the user can see. I need to build a function in my DLL that replaces all formulas with the actual values. Can anyone give me a hint on what functions to use? I would also appreciate if someone has links to documentation on how functions like Excel, Excel4, xlcWorkbookSelect, xlCoerce, xlFree, xlfEvaluate, etc works as it seems like all help on MSDN have disappeared. Thanks in advance /T |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can't you just do a CopyPasteSpecial xlValues ?
NickHK "T G" wrote in message ... I have a DLL that uses Microsoft Excel C API to modify data in Excel documents. It's an old DLL developed 6-7 years ago that needs to get a few fixes. It compiles in Visual C++ 6. I have Excel documents where the cells have formulas getting values that the user can see. I need to build a function in my DLL that replaces all formulas with the actual values. Can anyone give me a hint on what functions to use? I would also appreciate if someone has links to documentation on how functions like Excel, Excel4, xlcWorkbookSelect, xlCoerce, xlFree, xlfEvaluate, etc works as it seems like all help on MSDN have disappeared. Thanks in advance /T |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Probably, if I knew how to do it ;)
Could you give me a short sample code on what functions to use? As I said in my first post the documentation on Microsoft Excel C API doesn't seem to exist anymore on MSDN. /T "NickHK" wrote: Can't you just do a CopyPasteSpecial xlValues ? NickHK "T G" wrote in message ... I have a DLL that uses Microsoft Excel C API to modify data in Excel documents. It's an old DLL developed 6-7 years ago that needs to get a few fixes. It compiles in Visual C++ 6. I have Excel documents where the cells have formulas getting values that the user can see. I need to build a function in my DLL that replaces all formulas with the actual values. Can anyone give me a hint on what functions to use? I would also appreciate if someone has links to documentation on how functions like Excel, Excel4, xlcWorkbookSelect, xlCoerce, xlFree, xlfEvaluate, etc works as it seems like all help on MSDN have disappeared. Thanks in advance /T |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Recording a macro in Excel of your required actions will give you the VBA
code. Then it's up to you to translate that to C++. But something like : Range("A1").Copy Range("E11").PasteSpecial Paste:=xlPasteValues NickHK "T G" wrote in message ... Probably, if I knew how to do it ;) Could you give me a short sample code on what functions to use? As I said in my first post the documentation on Microsoft Excel C API doesn't seem to exist anymore on MSDN. /T "NickHK" wrote: Can't you just do a CopyPasteSpecial xlValues ? NickHK "T G" wrote in message ... I have a DLL that uses Microsoft Excel C API to modify data in Excel documents. It's an old DLL developed 6-7 years ago that needs to get a few fixes. It compiles in Visual C++ 6. I have Excel documents where the cells have formulas getting values that the user can see. I need to build a function in my DLL that replaces all formulas with the actual values. Can anyone give me a hint on what functions to use? I would also appreciate if someone has links to documentation on how functions like Excel, Excel4, xlcWorkbookSelect, xlCoerce, xlFree, xlfEvaluate, etc works as it seems like all help on MSDN have disappeared. Thanks in advance /T |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Since XLL in C API is an old technology. Currently we have many new extensions for Office production. e.g. Excel Automation with any COM ready language(C++/VB/.NET), VSTO 216686 How To Automate Excel From C++ Without Using MFC or #import http://support.microsoft.com/default...b;EN-US;216686 196135 How To Create an Automation Client Project Using ATL http://support.microsoft.com/default...b;EN-US;196135 238972 INFO: Using Visual C++ to Automate Office http://support.microsoft.com/default...b;EN-US;238972 If you have any other concern, please let me know. Best regards, Perter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This is an update for this issue. There's no easy way to access the IDispatch OM (i.e. what you'd use if you were programming in VB/VBA) from an XLL. XLLs use the XLM programming language to talk to XL. The best reference for the XLM programming language is macrofun.hlp, available he http://support.microsoft.com/kb/128185. Add either "xlf" or "xlc" to the command you wish to call from Excel4()/Excel12(). They should all be defined in xlcall.h. The archived XLL documentation is available at: http://msdn.microsoft.com/archive/. Expand the following: Office Solutions Development / Microsoft Office 97 / Office 97 / Product Documentation / Excel / Microsoft Excel 97 Developer¡¯s Kit. Click ¡°Introduction¡± - that should get you to the first "page" of the book. For your scenario, did my previous suggestion help you, e.g. write a C++ COM Addin to manipulate the Excel Object Modal and which will do almost all the job you do with Excel Menu/toolbar. This is the Excel Object Modal reference which is installed with Office problem.(below is for Office 11, excel 2003) <Program Files\Microsoft Office\OFFICE11\1033\VBAXL10.CHM If you still have any other concern, please let me know. Best regards, Perter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replacing formulas with its value | Excel Worksheet Functions | |||
Replacing Linked Cell Values w/ Current Values | Excel Worksheet Functions | |||
Replacing Formulas with Values | Excel Programming | |||
Replacing formulas in Excel | Excel Programming | |||
Replacing formulas in Excel | Excel Programming |