I would like to ask whether the vue spreadsheet components could provide 'documentPath' like in Pdf Viewer so that i can pass
the base64 string to get an initial view of my excel corresponding to the base64 string.
<template>
<div class="control-section">
<div id="spreadsheet-default-section">
<ejs-spreadsheet ref="spreadsheet" :openUrl="this.openUrl" :showRibbon="true" :showFormulaBar="true">
</ejs-spreadsheet>
</div>
</div>
</template>
<script>
import "@syncfusion/ej2-spreadsheet/styles/material.css";
import Vue from "vue";
import { SpreadsheetPlugin } from '@syncfusion/ej2-vue-spreadsheet';
Vue.use(SpreadsheetPlugin);
export default Vue.extend({
props: {
dataSource: String
},
data: () => {
return {
openUrl: 'http://192.168.0.131:5000/api/spreadsheet/open'
}
}
});
</script>
<template>
<div style="width:100%;height:100%;">
<ejs-pdfviewer id="pdfViewer" :serviceUrl="serviceUrl" zoomMode='FitToWidth' :documentPath="this.documentPath"></ejs-pdfviewer>
</div>
</template>
<script>
import "@syncfusion/ej2-pdfviewer/styles/material.css";
import Vue from 'vue';
import { PdfViewerPlugin, Toolbar, Magnification, Navigation, LinkAnnotation
, BookmarkView, Print, TextSelection, TextSearch } from '@syncfusion/ej2-vue-pdfviewer';
Vue.use(PdfViewerPlugin);
export default {
props: {
documentPath: String
},
name: 'pdf-view',
data () {
return {
serviceUrl:'http://192.168.0.131:5000/pdfviewer',
};
},
provide: {
PdfViewer: [Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, Print, TextSelection, TextSearch]
}
}
</script>