LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to set excel column width from visual C++ using COM automation?

I am writing a Visual C++ 6.0 client which need to launch Excel and
display some data using Excel COM automation interface. How can I
programmatically set the column width of a particular column (e.g.
column 3) in Excel?

I can easily achieve this in VB as follow:

sheet.Columns(3).ColumnWidth = 40

But I cannot do this in C++ because the method

LPDISPATCH _Worksheet::GetColumns()

does not take any argument. I believe this method return a Range
object.

How can I set the width of column 3 using C++?

Thanks

 
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
Change Cell Width WITHOUT changing Column width dww701 Excel Discussion (Misc queries) 1 January 12th 09 10:52 PM
how do I create multiple column width in the same column in excel Vish Excel Discussion (Misc queries) 9 November 3rd 06 11:49 PM
How to make cell width different than the column width it lies in John Excel Discussion (Misc queries) 2 September 11th 06 10:41 PM
Adjust Cell Width in Visual Basic j Excel Discussion (Misc queries) 2 July 5th 06 07:48 PM


All times are GMT +1. The time now is 09:40 AM.

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"