ah, ok understand
is there a Way to find out what ADO Component are installed
![Question :?:](./images/smilies/icon_question.gif)
This is easier with Excel Range.now i want to "FASTEDIT" Sheet but how to configure XBROWSE and/or "ADODB.Recordset"![]()
Code: Select all | Expand
function EditExcelRange()
local oRange := GetExcelRange( TrueName( "test3.xlsx" ) )
BrowseIt( oRange )
return nil
static function BrowseIt( u )
local oWnd, oBrw
DEFINE WINDOW oWnd TITLE "Edit ExcelRange " + FWVERSION
@ 0,0 XBROWSE oBrw SIZE 0,0 PIXEL DATASOURCE u ;
AUTOCOLS FASTEDIT CELL LINES NOBORDER
WITH OBJECT oBrw
:nEditTypes := { 1,1,1 }
:CreateFromCode()
END
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd CENTERED
return nil
Code: Select all | Expand
:nEditTypes := { 1,1,1 }
Code: Select all | Expand
:nEditTypes := EDIT_GET
oBrw:anydatas := uVal is a a short cut forwhat is
Code:
:nEditTypes := { 1,1,1 }
i "normal" knew
Code:
:nEditTypes := EDIT_GET
so what is Array mean![]()
Code: Select all | Expand
AEval( oBrw:aCols, { |o| o:anydata := uVal } )
Code: Select all | Expand
for n := 1 to Len( aValues )
oBrw:oCol( n ):anydata := aValues[ n ]
next
Code: Select all | Expand
oBrw:oCol( c ) // --> oCol whose header is "c"
oBrw:oCol( "anydata", uVal ) --> oCol where oCol:anydata is uVal
oBrw:oCol( {|o|cond} ) --> oCol which satisfies the condition in the codeblock
Code: Select all | Expand
aSortOrders := oBrw:cSortOrders
? aSortOrders
What 'big' size are you referring to? (rows,cols)?but it does not work for me with "big" *.XLSx ... (work only with small Sample)
GetExcelRange() returns oRange object of oExceli wonder "how" GetExcelRange() will work as it "only" Return oRange, not Recorsd-Set![]()
Code: Select all | Expand
what i´m doing now
1.) Connection -> FW_OpenADOExcelBook() -> return oCn
2.) Record-Set -> FW_OpenADOExcelSheet() -> return oRs
Code: Select all | Expand
FUNCTION ADOsheet( cFile )
LOCAL cTitle := cFile
LOCAL objRS, oBrw, jj, aEdit := {}
LOCAL cSheet, cRange, lHeaders := .T.
LOCAL oFont, oDlg
objRS := FW_OpenADOExcelSheet( cFile, cSheet, cRange, lHeaders )
FOR jj := 0 TO objRS:Fields:Count - 1 // FIELDs are zero-based
AADD(aEdit, EDIT_GET)
NEXT
SET CENTURY ON
SET DATE GERMAN
DEFINE FONT oFont NAME "Segoe UI" SIZE 0, - 18
ACTIVATE FONT oFont
END FONT
DEFINE DIALOG oDlg SIZE 1280, 1024 PIXEL FONT oFont TITLE cTitle COLOR BFcolor, BGcolor ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME )
@ 1, 1 XBROWSE oBrw SIZE - 1, - 1 PIXEL OF oDlg ;
RECORDSET objRS ;
AUTOCOLS ;
CELL LINES NOBORDER FASTEDIT UPDATE ;
FONT oFont COLOR BFcolor, BGcolor
oBrw:nEditTypes := aEdit
oBrw:CreateFromCode()
END DIALOG
ACTIVATE DIALOG oDlg CENTERED
objRS:Close()
RELEASE FONT oFont
RETURN nil
Code: Select all | Expand
FOR jj := 0 TO objRS:Fields:Count - 1 // FIELDs are zero-based
AADD(aEdit, EDIT_GET)
NEXT
//
//
oBrw:nEditTypes := aEdit
Code: Select all | Expand
oBrw:nEditTypes := EDIT_GET
You want to run your software on PCs where Office is not installed. For this reason, you want to use ADO.want to build a Tool which can "read/write" *.XLSx without EXCEL
but i must install ADO "Pack" ( Microsoft.ACE.OLEDB.12.0 ) else FW_OpenADOExcelSheet() will fail
ACE OLEDB installed on the target computer can be 32-bits version or 64-bits version.CODE run fine using BCC7 32 Bit but with MSVC 64 Bit XBROWSE is not "refresh" after "edit"![]()
"Inline Edit" is the inbuilt way of editing XBrowse cells. This is available at all times.how to get "Inline Edit?
Yes.can i use oBrowse:EditSource() with Record-Set ? ( Header as "Structure" ? )
Yes.can i "seek" in XBROWSE when use a Record-Set ?
oBrw:nRowSelhow do i get active ROW / COL where Cursor are ?
ah, oknageswaragunupudi wrote:This is not necessary:
This single line is enough:Code: Select all | Expand
oBrw:nEditTypes := EDIT_GET
on 32 Bit OS i use ADO 32 Bit and BCC7 32 Bit and XBNROWSE "refresh" fine after "edit"nageswaragunupudi wrote:ACE OLEDB installed on the target computer can be 32-bits version or 64-bits version.
If our application is 32bits, it can use only ACE 32-bit provider only.
To use 64-bit ACE provider, we need to build our application in 64-bits.
So which application we distribute? Our 32/64 bit application?
you talk about oCol but i use oBro ...nageswaragunupudi wrote:if
oCol:nEditType is > 0 and
oCol:lReadOnly is .F. ( default ) and
oCol:bEditWhen is NIL (default ) or Evaluates to .T.
Inline Edit of the cell is automatically available (whether oBrw:lFastEdit is .T. or .F. )
Code: Select all | Expand
oBrw:nEditTypes := EDIT_GET // work
oBrw:lReadOnly := .F. // no Effect ?
oBrw:bEditWhen := {|| .T. } // no Effect ?
oBrw:CreateFromCode()