current select i
TRANSCRIPT
-
8/19/2019 Current Select i
1/12
CurrentSelection
The QlikView Current Selections Box
Activate
Activate()
Makes the sheet object the active sheet object.
Earliest version:5.0x
ActivateAlso
ActivateAlso()
Adds the sheet object to the active sheet objects.
Earliest version:5.0x
AppendExport
AppendExport(String Path, String Separator, Integer CodePage)
Exports the sheet object by appending to an existing file (QV5 compatibility). Export should be used instead!
Parameters:Path (String) : File name with pathSeparator (String) : Separator to be used between values in recordCodePage (Integer) : Codepage number, e.g. :
0 = current ANSI1200 = Unicode65001 = UTF-8
Returns: No return value
Earliest version:6.0x
Example:set cs = ActiveDocument.GetSheetObject("CS01")
cs.AppendExport "C:\test.skv" , ";"
ApplyTheme
ApplyTheme(String FileName)
Apply theme to sheet object.
Parameters:FileName (String) : Theme file name with path
Returns: No return value
Earliest version:6.0x
CanPrint
Boolean CanPrint()
Returns true if sheet object is printable.
Earliest version:
6.0x
Close
Method Detail
Página 1 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
2/12
Close()
Removes the sheet object.
Earliest version:5.0x
CopyBitmapToClipboard
Boolean CopyBitmapToClipboard ()
Copies a bitmap image of the sheet object to the clipboard.
Earliest version:5.0x
CopyTableToClipboard
Boolean CopyTableToClipboard (Boolean IncludeLabels)
Copies the cells of a table to clipboard (table objects only).
Parameters:IncludeLabels (Boolean) : True if labels are to be included
Returns:True if operation was successful
Earliest version:5.0x
CopyTextToClipboard
Boolean CopyTextToClipboard ()
Irrelevant for this type of sheet object.
Earliest version:5.0x
CopyValuesToClipboard
Boolean CopyValuesToClipboard ()
Copies the values of a chart object to clipboard (not available for pivot tables).
Earliest version:5.0x
DbGetTableData
Ireturn object for SheetObject.DbGetTableData() and CustomDropDown.DbGetTableData() and GraphBasics.D... DbGetTableData(Variant (Array
Returns data from table for QV ODBC driver. No relevance for objects of this class
Parameters:Columns (Variant (Array of Integer)) : Array of column numbers to extract (0 based)ForceText (Variant (Array of Boolean)) : Not implementedStartRow (Integer) : First row to extract NoOfRows (Integer) : Number of rows to extract
Returns:Returns data from table for QV ODBC driver
Earliest version:5.0x
DbGetTableInfo
Ireturn object for SheetObject.DbGetTableInfo() and CustomDropDown.DbGetTableInfo() and GraphBasics.D... DbGetTableInfo()
Returns information about fields in table for QV ODBC driver. No relevance for objects of this class
Earliest version:
Página 2 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
3/12
5.0x
DbIsTable
Boolean DbIsTable()
Returns true if the object is a table box, straight table or bitmap chart (and thus can deliver data to QV ODBC driver).
Earliest version:5.0x
Deactivate
Deactivate()
Removes the sheet object from the list of active sheet objects.
Earliest version:6.0x
DialogPrint
Boolean DialogPrint()
Opens the Print dialog for the sheet object.
Earliest version:6.0x
Example:ActiveDocument.GetSheetObject( "CS01" ).DialogPrint
DialogProperties
Boolean DialogProperties(Integer Page)
Opens sheet object properties dialog.
Parameters:Page (Integer) : Property dialog page (0 based). -1 opens on last used page.
Returns: No return value
Earliest version:5.0x
Export
Export(String Path, String Separator, Integer CodePage, Boolean Append)
Exports current selections to file.
Parameters:Path (String) : File name with pathSeparator (String) : Separator to be used between values in recordCodePage (Integer) : Codepage number, e.g. :
0 = current ANSI1200 = Unicode65001 = UTF-8 Append (Boolean) : True if export to be appended to existing file
Returns: No return value
Earliest version:5.0x
Example:set cs = ActiveDocument.GetSheetObject("CS01")
cs.Export "C:\test.skv" , ";"
ExportBitmapToFile
Boolean ExportBitmapToFile(String Filename)
Página 3 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
4/12
Exports a bitmap image of the sheet object to a file.
Parameters:Filename (String) : File name with path
Returns:Returns true if export succeeded
Earliest version:6.0x
ExportHtml
ExportHtml(String Path)
Exports values to file in HTML format.
Parameters:Path (String) : File name with path
Returns: No return value
Earliest version:6.0x
Example:set cs = ActiveDocument.GetSheetObject("CS01")
cs.ExportHtml "C:\test.skv"
GetCaption
ICaption GetCaption()
Returns sheet object caption.
Earliest version:6.0x
GetCell
IRCCell GetCell(Integer Row, Integer Column)
Returns a sheet object cell by its x/y coordinates in the current state of the layout.
Parameters:Row (Integer) : Sheet object row (0 based)Column (Integer) : Sheet object column (0 based)
Returns:Cell content object returned
Earliest version:6.0x
Example:set table = ActiveDocument.GetSheetObject( "CS01" )
for RowIter = 0 to table.GetRowCount-1
for ColIter =0 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
msgbox(cell.Text)
nextnext
GetCells
IArrayOfArrayOfRCCell GetCells(IRect Rect)
Returns a set of sheet object cells in the current state of the layout.
Parameters:Rect (IRect) : Rectangle describing which cells to return
Returns:Array of cell content objects returned
Earliest version:
6.0x
Example:set table = ActiveDocument.GetSheetObject( "CS01" )
CellRect = ActiveDocument.GetApplication().GetEmptyRect()
CellRect.Top = 0
CellRect.Left = 0
Página 4 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
5/12
CellRect.Width = table.GetColumnCount
CellRect.Height = table.GetRowCount
set CellMatrix = table.GetCells( CellRect )
for RowIter=CellRect.Top to CellRect.Height-1
for ColIter=CellRect.Left to CellRect.Width-1
msgbox(CellMatrix(RowIter)(ColIter).Text)
next
next
GetCells2
IArrayOfArrayOfRCCell GetCells2(Integer Left, Integer Top, Integer Width, Integer Height)
Returns a set of sheet object cells in the current state of the layout.
Parameters:Left (Integer) : left position of index of base cell (0 based)Top (Integer) : Top position of index of base cell (0 based) Width (Integer) : Number of cells in horizontal directionHeight (Integer) : Number of cells in vertical direction
Returns:Array of cell content objects returned
Earliest version:6.0x
Example:set table = ActiveDocument.GetSheetObject( "CS01" )
w = table.GetColumnCounth = table.GetRowCount
set CellMatrix = table.GetCells2(0,0,w,h)
for RowIter=0 to h-1
for ColIter=0 to w-1
msgbox(CellMatrix(RowIter)(ColIter).Text)
next
next
GetColumnCount
Integer GetColumnCount()
Returns number of columns in current selections box.
Earliest version:6.0x
Example:set table = ActiveDocument.GetSheetObject( "CS01" )
w = table.GetColumnCount
h = table.GetRowCount
set CellMatrix = table.GetCells2(0,0,w,h)
for RowIter=0 to h-1
for ColIter=0 to w-1
msgbox(CellMatrix(RowIter)(ColIter).Text)
next
next
GetDoc
Document GetDoc()
Returns the document.
Earliest version:5.0x
GetFrameDef
IFrame GetFrameDef()
Returns frame, border and caption settings for the sheet object with position rectangles in docunits. Replaces GetFrame from QV5
Earliest version:6.0x
GetNoOfRows
Integer GetNoOfRows()
Returns the number of rows (fields with selections) in the current selection box.
Página 5 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
6/12
Earliest version:5.0x
Example:set cs = ActiveDocument.GetSheetObject("CS01")
msgbox(cs.GetNoOfRows)
GetObjectCalcTime
Integer GetObjectCalcTime()
Returns latest object calculation time.
Earliest version:6.0x
GetObjectId
String GetObjectId ()
Returns th e unique ID for the sheet object.
Earliest version:
5.0x
GetObjectMemoryUsage
Integer GetObjectMemoryUsage()
Returns latest object calculation memory usage.
Earliest version:6.0x
GetObjectType
short GetObjectType()
Returns code for sheet object type.
Earliest version:5.0x
GetPrintOptions
IPrinterOptions GetPrintOptions()
Returns printer settings for the sheet object.
Earliest version:6.0x
GetProperties
ICurrentSelectionProperties GetProperties()
Returns current selection box properties.
Earliest version:5.0x
Example:set cs = ActiveDocument.Sheets("Main").CreateCurrentSelectionBox
set prop = cs.GetProperties
prop.Layout.ShowLabelRow = false
cs.SetProperties prop
GetRect
IRect GetRect()
Página 6 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
7/12
Returns sheet object position/size rectangle (pixels).
Earliest version:7.00
GetRelevantSelections
Variant (Array of String) GetRelevantSelections()
Returns the current selections relevant for the object.
Earliest version:5.0x
GetReplacementObject
LPDISPATCH GetReplacementObject()
Returns pointer to OCX replacement object.
Earliest version:5.0x
GetRowCount
Integer GetRowCount()
Returns number of rows in current selections box.
Earliest version:6.0x
Example:set table = ActiveDocument.GetSheetObject( "CS01" )
w = table.GetColumnCount
h = table.GetRowCount
set CellMatrix = table.GetCells2(0,0,w,h)
for RowIter=0 to h-1
for ColIter=0 to w-1
msgbox(CellMatrix(RowIter)(ColIter).Text) next
next
GetSheet
Sheet GetSheet()
Returns the sheet where the sheet object resides.
Earliest version:5.0x
GetStatus
Integer GetStatus()
Returns sheet object state.
Earliest version:6.0x
GetTableAsText
String GetTableAsText(Boolean IncludeLabels)
Not implemented for this object type.
Parameters:
IncludeLabels (Boolean) : Not implemented for this object type
Returns: Not implemented for this object type
Earliest version:
Página 7 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
8/12
5.0x
GetTableInfo
IRCTableInfo GetTableInfo()
Returns table formatting information.
Earliest version:6.0x
Example:set table = ActiveDocument.GetSheetObject( "CS01" )
set ti = table.getTableInfo
font = ti.DefaultFont
GetZedLevel
Integer GetZedLevel()
Returns z layer for sheet object.
Earliest version:6.0x
IsActive
Boolean IsActive()
Returns true if the sheet object is active.
Earliest version:5.0x
IsMaximized
Boolean IsMaximized ()
Returns true if sheet object is maximized.
Earliest version:5.0x
IsMinimized
Boolean IsMinimized ()
Returns true if the sheet object is minimized.
Earliest version:5.0x
Maximize
Maximize()
Maximizes the sheet object if maximizable.
Earliest version:5.0x
Minimize
Minimize()
Minimizes the sheet object as an icon if minimizable.
Earliest version:5.0x
Página 8 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
9/12
MoveToSheet
Boolean MoveToSheet(String SheetId)
Moves the sheet object to a specified sheet.
Parameters:SheetId (String) : Sheet ID of target sheet
Returns:True if operation succeeded
Earliest version:7.00
Print
Boolean Print()
Prints the sheet object if printable. Use PrintOut method from VB to avoid conflicts with the VB keyword Print
Earliest version:5.0x
PrintEx
Boolean PrintEx(String PrinterName, Boolean ShowPrinterDlg)
Prints the sheet object to a named printer.
Parameters:PrinterName (String) : Name of printer. If omitted default printer will be usedShowPrinterDlg (Boolean) : True if Print dialog should be shown
Returns:Returns true if object is printable
Earliest version:7.00
PrintOut
Boolean PrintOut()
Prints the sheet object. Same as Print method but to be used from VB where the Print keyword may otherwise cause problems
Earliest version:5.0x
Restore
Restore()
Restores the minimized sheet object if minimized.
Earliest version:5.0x
SendToExcel
Integer SendToExcel()
No relevance for objects of this class.
Earliest version:5.0x
ServerSideExport
ServerSideExport(String Path, String Separator, Integer CodePage, Boolean Append)
Exports current selections to file from QlikWebServer. In standard QV equal to Export
Página 9 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
10/12
Parameters:Path (String) : File name with pathSeparator (String) : Separator to be used between values in recordCodePage (Integer) : Codepage number, e.g. :
0 = current ANSI1200 = Unicode65001 = UTF-8 Append (Boolean) : True if export to be appended to existing file
Returns: No return value
Earliest version:5.0x
Example:set cs = ActiveDocument.GetSheetObject("CS01")
cs.ServerSideExport "C:\test.skv" , ";" , 0 'ANSI
ServerSideExportEx
ServerSideExportEx(String Path, String Separator, Integer Mode, Integer CodePage, Boolean Append)
Exports current selections to file in QlikView Server.
Parameters:Path (String) : File name with pathSeparator (String) : Separator to be used between values in record
Mode (Integer) : 0=HTML1=Text2=Bitmap3=XML4=QVD5=BIFFCodePage (Integer) : Codepage number, e.g. :0 = current ANSI1200 = Unicode65001 = UTF-8 Append (Boolean) : True if export to be appended to existing file
Returns:
Earliest version:9.00
Example:set cs = ActiveDocument.GetSheetObject("CS03")
cs.ServerSideExportEx "C:\test.html" , ";" , 0 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF
SetBorder
SetBorder(IFrame Frame)
Sets border settings for the sheet object.
Parameters:Frame (IFrame) : Frame (border) object
Returns: No return value
Earliest version:5.0x
SetFont
SetFont(IBaseFont Font)
Sets font for the sheet object.
Parameters:Font (IBaseFont) : Font object
Returns: No return value
Earliest version:5.0x
SetFrame
SetFrame(IFrame Frame, Boolean RectsAlso, Variant (Array of short) Parts)
Página 10 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
11/12
Sets frame, border and caption settings for the sheet object.
Parameters:Frame (IFrame) : Sheet object frameRectsAlso (Boolean) : True if position/size rectangles to be includedParts (Variant (Array of short)) : Parts of frame to be set.Should either be empty (all parts set)or contain an array containing one element for each part of the frame to be set. The elementshould contain one of the numbers below:0 BORDER_CHANGE,
1 CAPTION_ON_OFF,2 LAYER_CHANGE,3 ALLOWMINIM_CHANGE,4 ALLOWMAXIM_CHANGE,5 ALLOWINFO_CHANGE,6 AUTOMIN_CHANGE,7 ALLOWMOVESIZE_CHANGE,8 CONDSHOW_CHANGE,9 FONT_CHANGE,10 ADVANCEDCAPTION_CHANGE,11 MACRO_TRIGGER_CHANGE,The order of the elements is arbitrary.
Returns: No return value
Earliest version:6.0x
SetFrameDef
SetFrameDef(IFrame Frame)
Sets sheet object frame with position/size rectangle in docunits.
Parameters:Frame (IFrame) : Sheet object frame with position/size rectangle in docunits
Returns: No return value
Earliest version:7.00
SetLayer
SetLayer(Integer Level)
Sets layer for the sheet object.
Parameters:Level (Integer) : -1 is Bottom, 0 is Normal, 1 is Top ; -127 to 127 accepted
Returns: No return value
Earliest version:5.0x
SetPixWidths
SetPixWidths(Variant (Array of Integer) PixWidths)
Sets pixel widths for each of the columns in the current selection box.
Parameters:PixWidths (Variant (Array of Integer)) : Width in pixels for each column
Returns: No return value
Earliest version:5.0x
Example:set cs = ActiveDocument.GetSheetObject("CS01")
dim w(2)
w(0) = 150
w(1) = 50
w(2) = 300cs.SetPixWidths w
SetPrintOptions
Página 11 de 12CurrentSelection
17/03/2016file:///C:/Users/Opss/Downloads/QlikViewAPI_html/CurrentSelection.htm
-
8/19/2019 Current Select i
12/12
SetPrintOptions(IPrinterOptions Opt)
Sets printer settings for the sheet object.
Parameters:Opt (IPrinterOptions) : Printer settings object
Returns: No return value
Earliest version:
6.0x
SetProperties
SetProperties(ICurrentSelectionProperties Properties)
Sets current selection box properties.
Parameters:Properties (ICurrentSelectionProperties) : Current Selection box properties object
Returns: No return value
Earliest version:5.0x
Example:set cs = ActiveDocument.Sheets("Main").CreateCurrentSelectionBox
set prop = cs.GetProperties
prop.Layout.ShowLabelRow = false
cs.SetProperties prop
SetRect
SetRect(IRect WinRect)
Sets the position rectangle for the sheet object. Rectangle must be in pixels.
Parameters: WinRect (IRect) : Position rectangle object
Returns: No return value
Earliest version:5.0x
WriteXmlPropertiesFile
WriteXmlPropertiesFile(String FileName)
Writes an xml file with properties describing the sheet object.
Parameters:FileName (String) : File name with path
Returns: No return value
Earliest version:7.00
Página 12 de 12CurrentSelection