Jump to content

Excel-like Grid COM object


smahdi83
 Share

Recommended Posts

Hi,

Does it have to ..

1. be a com object?

2. calculate like excel, or just display?

if not, then Eltorro's scripts are a good start and work on tabs, I think...

Edit In Place Listview (multi-column), - works with tabs...

or for beta 3.2.9.4, attached files.

Randall

[or 2nd zip for beta 3.2.9.4, sorts with icons too..., but not tried on tabs]

Edited by randallc
Link to comment
Share on other sites

Hi,

Does it have to ..

1. be a com object?

2. calculate like excel, or just display?

if not, then Eltorro's scripts are a good start and work on tabs, I think...

Edit In Place Listview (multi-column), - works with tabs...

or for beta 3.2.9.4, attached files.

Randall

[or 2nd zip for beta 3.2.9.4, sorts with icons too..., but not tried on tabs]

Thanks for your help but I've already looked into these options. It's not what I'm looking for. I already have the perfect object to do that except that it's too unstable. If I can get it to function properly, it would be perfect! Here's the code maybe you can help. You will see that when you try to edit the cells, the object either gets misplaced or dissapears. How can I fix that?

You need to have Office Web Components installed but that comes with MS Office.

Thanks,

#include <GUIConstants.au3>

$Form2 = GUICreate("Form2", 793, 541, 294, 196, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
$Tab1 = GUICtrlCreateTab(8, 16, 777, 513)
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
Local $oExcel1

;Declare objects
$oExcel1 = ObjCreate("OWC11.spreadsheet"); Office 2003  

If not IsObj($oExcel1) Then
    $oExcel1 = ObjCreate("OWC10.spreadsheet");Default to Office XP
EndIf
If not IsObj($oExcel1) Then
    $oExcel1 = ObjCreate("OWC00.spreadsheet"); Office 2000
EndIf

Local $oExcel2

;Declare objects
$oExcel2 = ObjCreate("OWC11.spreadsheet");Office 2003 

If not IsObj($oExcel2) Then
    $oExcel2 = ObjCreate("OWC10.spreadsheet");Default to Office XP   
EndIf
IF not IsObj($oExcel2) Then
    $oExcel2 = ObjCreate("OWC00.spreadsheet");ffice 2000
EndIf

$allocation_bulk_reguacc_excel = GUICtrlCreateObj($oExcel1, 100, 75, 220, 420)
GUICtrlSetStyle($allocation_bulk_reguacc_excel, $WS_VISIBLE)
GUICtrlSetResizing ($allocation_bulk_reguacc_excel, $GUI_DOCKAUTO)
$allocation_bulk_regiacc_excel = GUICtrlCreateObj($oExcel2, 400, 75, 220, 420)
GUICtrlSetStyle($allocation_bulk_regiacc_excel, $WS_VISIBLE)
GUICtrlSetResizing ($allocation_bulk_regiacc_excel, $GUI_DOCKAUTO)
GUISetState(@SW_MAXIMIZE)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Edited by smahdi83
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...