Document Solutions Data Viewer constructor.
root container element or selector pattern used to select the root container element.
Static LicenseProduct license key.
<script>
// Add your license
DsDataViewer.LicenseKey = 'XXX';
// Add your code
const viewer = new DsDataViewer("#viewer");
</script>
Get the current toolbar layout information.
viewer.toolbarLayout
Sets the toolbar layout information and modify layout.
viewer.toolbarLayout = { default: ['open', 'zoom', 'fullscreen', 'theme-change'] }
Get the current sidebar layout information.
viewer.sidebarLayout
Sets the sidebar layout information and modify layout. Currently supported: SearchPanel.
// Open SearchPanel
viewer.sidebarLayout = ['SearchPanel'];
// Clear all sidebars
viewer.sidebarLayout = [''];
// Default sidebar layout
viewer.sidebarLayout = [];
Static findGets the viewer instance using the host element or host element selector
var viewer = DsDataViewer.findControl("#root");
Open data file.
The data file.
The type of the imported data file.
Optional openOptions: XlsxOpenOptions | SSJsonOpenOptions | CsvOpenOptions | SjsOpenOptionsThe options for imported data file.
viewer.openFile("Documents/HelloWorld.xlsx", FileType.XLSX, {loadHiddenSheets: true});
Document Solutions Data Viewer control.