Unplanned
Last Updated: 24 Jul 2024 12:19 by ADMIN
Ekaterina
Created on: 23 Jul 2024 11:16
Category: Spreadsheet
Type: Feature Request
1
Print the active sheet in Spreadsheet

Hello.

I have a spreadsheet containing some number of sheets. I would like to implement a function that would print the active sheet. Is there such a possibility? 

const toolbar = [
    {
        text: 'Tab',
        selected: true,
        tools: [ExcelExport],
    },
]
const Sheets = () => {
   

const spreadsheetRef= React.useRef(null)

const onExcelExport = async (event) => {
   event.preventDefault()
   //...

}

return (

<Spreadsheet
    ref = {spreadsheetRef}
    defaultProps = {data}
    toolbar = {toolbar}
  onExcelExport = {onExcelExport}
/>

)

}


3 comments
ADMIN
Wissam
Posted on: 24 Jul 2024 12:19

Hello, Ekaterina,

Thank you for pointing this out. I changed this item's title to be for printing, as it is also not possible to print a specific sheet.

Regards,
Wissam
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

Ekaterina
Posted on: 24 Jul 2024 11:36
Thank you.

I would like to point out once again that I am not only interested in the function of exporting the active sheet, but also in printing the active sheet.
Attached Files:
ADMIN
Wissam
Posted on: 24 Jul 2024 07:24

Hello, Ekaterina,

I checked the source code for the saveAsExcel method of the SpreadSheetHandle and I could see that there isn't an option to export a specific sheet. On the other hand, the component allows getting the active sheet using `spreadsheetRef.current.activeSheet()`.

One thing I can suggest would be to modify the value passed to `defaultProps.sheets` to include only the data of the active sheet. You can do that based on the value of `spreadsheetRef.current.activeSheet()`.

Moreover, I am converting this thread to a public feature request in our feedback portal where new ideas are constantly being evaluated and the most popular ones are implemented in future releases:

In addition, I updated your Telerik points accordingly as a small token of gratitude for your report.

If you have any further questions, please let me know.

Regards,
Wissam
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024