Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
T G T G is offline
external usenet poster
 
Posts: 4
Default Replacing formulas with values from DLL

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Replacing formulas with values from DLL

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   Report Post  
Posted to microsoft.public.excel.programming
T G T G is offline
external usenet poster
 
Posts: 4
Default Replacing formulas with values from DLL

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Replacing formulas with values from DLL

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Replacing formulas with values from DLL

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Replacing formulas with values from DLL

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
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
Replacing formulas with its value Marcus A Excel Worksheet Functions 4 September 21st 06 06:24 PM
Replacing Linked Cell Values w/ Current Values TomCat Excel Worksheet Functions 6 April 10th 06 12:20 PM
Replacing Formulas with Values Tom Ogilvy Excel Programming 1 August 16th 05 07:54 PM
Replacing formulas in Excel David McRitchie Excel Programming 3 April 15th 04 03:49 AM
Replacing formulas in Excel Tom Ogilvy Excel Programming 0 April 14th 04 07:38 PM


All times are GMT +1. The time now is 08:04 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"