Excel - Sort help

This is a discussion on Excel - Sort help within the xharbour forums in Programming Languages category; Dear Friends, with this code in 2007 excel version work well but in 2003 excel version generate an error: [insert this code in my previous post after TRY of label // Fase di impostazione per la stampa] nColOrder := 3 WITH OBJECT oExcel:ActiveWorkbook:Worksheets(acName[nPos]):Sort() :SortFields:Clear() :SortFields:Add( oSheet[nPos]:Range( oSheet[nPos]:Cells( 2, nColOrder ), oSheet[nPos]:Cells( anRiga[nPos], nColOrder ) ) ) //, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ) :SetRange( oSheet[nPos]:Range( oSheet[nPos]:Cells( 2, 1 ), oSheet[nPos]:Cells( anRiga[nPos], nTitle ) ) ) // :Header := xlYes // :MatchCase := False // :Orientation := xlTopToBottom // :SortMethod := xlPinYin :Apply() END Thank you for your help. Regards, Ugo...

Go Back   Application Development Forum > Programming Languages > xharbour

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-28-2008, 06:42 AM
garombo@gmail.com
Guest
 
Default Excel - Sort help

Dear Friends,
with this code in 2007 excel version work well but in 2003 excel
version generate an error:
[insert this code in my previous post after TRY of label // Fase di
impostazione per la stampa]
nColOrder := 3
WITH OBJECT
oExcel:ActiveWorkbook:Worksheets(acName[nPos]):Sort()
:SortFields:Clear()
:SortFields:Add( oSheet[nPos]:Range( oSheet[nPos]:Cells( 2,
nColOrder ), oSheet[nPos]:Cells( anRiga[nPos], nColOrder ) ) ) //,
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal )
:SetRange( oSheet[nPos]:Range( oSheet[nPos]:Cells( 2, 1 ),
oSheet[nPos]:Cells( anRiga[nPos], nTitle ) ) )
// :Header := xlYes
// :MatchCase := False
// :Orientation := xlTopToBottom
// :SortMethod := xlPinYin
:Apply()
END

Thank you for your help.

Regards,
Ugo
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:46 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.