Sunday, July 20th 2008, 2:40pm UTC+1

You are not logged in.

  • Login
  • Register

ryo

Beginner

1

Tuesday, May 6th 2008, 10:42am

Excel (again...)

Hello guys !

I need to change the number format of a cell in Excel.
Anyone does how to do that ?
I'm using DynamicCall(...)


THX !
  • Go to the top of the page

2

Tuesday, May 6th 2008, 10:02pm

RE: Excel (again...)

use the format in vba
or
Columns("B:B").NumberFormat = "@"

This post has been edited 1 times, last edit by "KingMike" (May 6th 2008, 10:03pm)

  • Go to the top of the page

ryo

Beginner

3

Wednesday, May 7th 2008, 8:40am

RE: Excel (again...)

Quoted

Originally posted by KingMike
use the format in vba
or
Columns("B:B").NumberFormat = "@"


ok it works in vba but how in qt?

Am i suppose to use DynamicCall() or querySubObject() ?
and what do i put in DynamicCall("..........") or querySubObject("..........") ?

Thx
  • Go to the top of the page

ryo

Beginner

4

Wednesday, May 7th 2008, 10:39am

Excel (again...)

thanks for help,

now it works fine !
here is the code used :

Source code

1
2
range = myWorksheet->querySubObject( "Range(const QVariant&).Value", "A1:A6" );
range->dynamicCall( "SetNumberFormat(QVariant&)", QVariant("###,###.##"));



Thx KingMike
  • Go to the top of the page

Rate this thread