- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I work on some excel application in fortran.
y use Autosetproperty(range,"?????", value).
I look for the parameters to make bold the cell content and to align the content to center.
Do you have any idea or any reference.
regards
y use Autosetproperty(range,"?????", value).
I look for the parameters to make bold the cell content and to align the content to center.
Do you have any idea or any reference.
regards
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First suggestion, as a reference, is naturally Autodice example in CVF but you're presumably gone through that. Required parameters, as for all Automation Servers, should be documented in the Server docs so a search within MSDN Excel developer's Kit should give some results/answers. I might be wrong but think that's boolean true/false parameter (for bold). As far as I can remember to justify text in a cell you have to use Justify method. Other good examples and sources of info you can find here.
Artur
Artur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
But I couldn't neccessary information at the MSDN web site because information or samples are given using VB or VBA.
For example, it is ok to write only
HorizontalAlignment=XlRight, or XlCenter etc.
In our case, in fortran, it is required to assign a value to Xlcenter.
for instance, it is like -42620 (now y don't remember exact number) for XlRight.
I look for that value for Xlcenter, xlleft and the statement for fontbold.
Regards
But I couldn't neccessary information at the MSDN web site because information or samples are given using VB or VBA.
For example, it is ok to write only
HorizontalAlignment=XlRight, or XlCenter etc.
In our case, in fortran, it is required to assign a value to Xlcenter.
for instance, it is like -42620 (now y don't remember exact number) for XlRight.
I look for that value for Xlcenter, xlleft and the statement for fontbold.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try these,
xlLeft= -4131
xlRight= -4152
XlCenter= -4108
Artur
xlLeft= -4131
xlRight= -4152
XlCenter= -4108
Artur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can find partial list of constants here. Translation to Fortran is trivial (replace #define with integer, parameter:: ). I think[http://download.microsoft.com/download/office95pro/constant/1/WIN98/EN-US/wc0993.exe]wc0993.exe[/url] contains full list for Office.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arturguzik and Jugoslavdujic,
Thanks for your supports. It works with excel constants given by you. Perfect!
But, I can not still solve the border and fontbold problem.
I try with below code but it doesn't work.
Integer , parameter:: xledgebottom = 9
....
Satatus=AutoSetproperty(range, "Borders",xledgebottom)
Satatus=AutoSetproperty(range, "font.bold",.true.)
I put "Borders" and "font.bold" definitions by making analogy to VBA.
Do you have any idea?
Regards
Thanks for your supports. It works with excel constants given by you. Perfect!
But, I can not still solve the border and fontbold problem.
I try with below code but it doesn't work.
Integer , parameter:: xledgebottom = 9
....
Satatus=AutoSetproperty(range, "Borders",xledgebottom)
Satatus=AutoSetproperty(range, "font.bold",.true.)
I put "Borders" and "font.bold" definitions by making analogy to VBA.
Do you have any idea?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just tried to break trough the imported type library and dig it out. Maybe this will work (range, "RHS", .true.). If still fails I'll try to think of something else.
With borders I think that some parameters in your statement are missing.
Jugoslav, as always, will definitely be of much better assistance with this.
Artur
With borders I think that some parameters in your statement are missing.
Jugoslav, as always, will definitely be of much better assistance with this.
Artur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
selahattin
The reason why you cannot set these "properties" is because they return objects; borders is a collection object and font is an object. You need to get a pointer to the font object before you can set its properties (of which bold is one). The same with the borders collection.
hope this helps,
regards,
Marco A. Garcia
Canaima Software, Inc.
www.canaimasoft.com
The reason why you cannot set these "properties" is because they return objects; borders is a collection object and font is an object. You need to get a pointer to the font object before you can set its properties (of which bold is one). The same with the borders collection.
hope this helps,
regards,
Marco A. Garcia
Canaima Software, Inc.
www.canaimasoft.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marco,
Thanks for your advice.
But, still I couldn't do it.
Would you like to give a code fragment shows this topic, please?
Thanks at advance.
Thanks for your advice.
But, still I couldn't do it.
Would you like to give a code fragment shows this topic, please?
Thanks at advance.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page