custom:api_js_opengwxlsxviewertab

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Prossima revisione
Revisione precedente
custom:api_js_opengwxlsxviewertab [2024/10/29 17:32]
giorgio.scali creata
custom:api_js_opengwxlsxviewertab [2024/10/29 17:37] (versione attuale)
giorgio.scali
Linea 1: Linea 1:
-====== Apertura ​xlsx Viewer======+====== Apertura ​gwXlsxViewer ​======
  
 La gwXlsxViewer è una particolare tipologia di scheda descritta [[gwusermanual:​interface:​schede#​gwXlsxViewer|qui]]. La gwXlsxViewer è una particolare tipologia di scheda descritta [[gwusermanual:​interface:​schede#​gwXlsxViewer|qui]].
 +Introdotta in **4.7.3** ([[https://​gitlab.com/​geowebframework/​geowebframework/​-/​issues/​1417|issue #1417]])
  
 La scheda può essere aperta in floatingPane o in tab. La scheda può essere aperta in floatingPane o in tab.
Linea 22: Linea 23:
  
 ==== Esempi ==== ==== Esempi ====
-Apertura ​scheda con valori ​di default:+Apertura di un file xlsx prodotto in maniera standard:
 <code javascript example.js>​ <code javascript example.js>​
  var fileName = '​Pianificazione Attività.xlsx';​  var fileName = '​Pianificazione Attività.xlsx';​
Linea 47: Linea 48:
  
  
 +Apertura con viewerOptions con valori di default:
 +<code javascript example.js>​
 +
 +var fileName = '​Pianificazione Attività.xlsx';​
 +var startDate = new Date(); //TODO
 +var endDate = new Date(new Date().getTime()+(1000*60*60*24*365*2));​ //TODO
 +
 +//see link for luckysheet options
 +// https://​dream-num.github.io/​LuckysheetDocs/​guide/​config.html#​configuration-item
 +var viewerOptions = {
 +    autoFormatw:​ false,
 + allowCopy: true,
 +
 + showinfobar:​ false,
 + sheetFormulaBar:​ false,
 +
 + showtoolbar:​ false,
 + /​*showtoolbarConfig:​ {
 + undoRedo: true, //Undo redo
 + paintFormat:​ true, //Format brush
 + currencyFormat:​ true, //currency format
 + percentageFormat:​ true, //​Percentage format
 + numberDecrease:​ true, //'​Decrease the number of decimal places'​
 + numberIncrease:​ true, //'​Increase the number of decimal places
 + moreFormats:​ true, //'​More Formats'​
 + font: true, //'​font'​
 + fontSize: true, //'​Font size'
 + bold: true, //'​Bold (Ctrl+B)'​
 + italic: true, //'​Italic (Ctrl+I)'​
 + strikethrough:​ true, //'​Strikethrough (Alt+Shift+5)'​
 + underline:​ true, // '​Underline (Alt+Shift+6)'​
 + textColor:​ true, //'​Text color'
 + fillColor:​ true, //'​Cell color'
 + border: true, //'​border'​
 + mergeCell:​ true, //'​Merge cells'
 + horizontalAlignMode:​ true, //'​Horizontal alignment'​
 + verticalAlignMode:​ true, //'​Vertical alignment'​
 + textWrapMode:​ true, //'​Wrap mode'
 + textRotateMode:​ true, //'​Text Rotation Mode'
 + image: true, // '​Insert picture'​
 + link: true, // '​Insert link'
 + chart: true, //'​chart'​ (the icon is hidden, but if the chart plugin is configured, you can still create a new chart by right click)
 + postil: true, //'​comment'​
 + pivotTable:​ true, //'​PivotTable'​
 + '​function':​ true, //'​formula'​
 + frozenMode:​ true, //'​freeze mode'
 + sortAndFilter:​ true, //'​Sort and filter'​
 + conditionalFormat:​ true, //'​Conditional Format'​
 + dataVerification:​ true, // 'Data Verification'​
 + splitColumn:​ true, //'​Split column'​
 + screenshot:​ true, //'​screenshot'​
 + findAndReplace:​ true, //'​Find and Replace'​
 + protection:​ true, // '​Worksheet protection'​
 + print: false // '​Print'​
 + },*/
 +
 + showsheetbar:​ true,
 + showsheetbarConfig:​ {
 + add: false, //Add worksheet
 + menu: true, //Worksheet management menu
 + sheet: true //Worksheet display
 + },
 +
 + showstatisticBar:​ true,
 + showstatisticBarConfig:​ {
 + count: false, // Count bar
 + view: true, // Print view
 + zoom: true // Zoom
 + },
 +
 + showConfigWindowResize:​ true,
 +
 + userMenuItem:​ null,
 +
 + myFolderUrl:​ null,
 +
 + cellRightClickConfig:​ {
 + copy: false, // copy
 + copyAs: false, // copy as
 + paste: false, // paste
 + insertRow:​ false, // insert row
 + insertColumn:​ false, // insert column
 + deleteRow:​ false, // delete the selected row
 + deleteColumn:​ false, // delete the selected column
 + deleteCell:​ false, // delete cell
 + hideRow: false, // hide the selected row and display the selected row
 + hideColumn:​ false, // hide the selected column and display the selected column
 + rowHeight:​ false, // row height
 + columnWidth:​ false, // column width
 + clear: false, // clear content
 + matrix: false, // matrix operation selection
 + sort: false, // sort selection
 + filter: false, // filter selection
 + chart: false, // chart generation
 + image: false, // insert picture
 + link: false, // insert link
 + data: false, // data verification
 + cellFormat:​ false // Set cell format
 + },
 +
 + sheetRightClickConfig:​ {
 + '​delete':​ false, //Delete
 + copy: false, //Copy
 + rename: false, //Rename
 + color: false, //Change color
 + hide: false, //Hide, unhide
 + move: false //Move to the left, move to the right
 + },
 +
 +
 + enableAddRow:​ false,
 + enableAddBackTop:​ false
 +};
 +
 +var params = {
 +    href: gwContextPath+'/​rest/​exportByGroovyExecution',​
 +    method: '​POST',​
 +    fileName: fileName,
 +    data: {
 +        groovy: '​export_pianificazione.groovy',​
 +        fileName: fileName,
 +        startDate: startDate,
 +        endDate: endDate,
 +        //​viewerOptions:​ viewerOptions
 +    }
 +};
 +var floatingPane = openGwXlsxViewerFloatingPane(params);​
 +
 +</​code>​
  
 ===== openGwXlsxViewerTab() ===== ===== openGwXlsxViewerTab() =====
Linea 96: Linea 226:
  openGwXlsxViewerTab(params,​ title);  openGwXlsxViewerTab(params,​ title);
 </​code>​ </​code>​
 +
  • custom/api_js_opengwxlsxviewertab.1730219521.txt.gz
  • Ultima modifica: 2024/10/29 17:32
  • da giorgio.scali