Telerik Forums
Telerik Document Processing Forum
1 answer
26 views

Hello,

I am trying to upload the stream object received from the 'ToXlsxStream' method of Telerik SpreadSheet processing library to Azure blob container. Unfortunately, it is saving as a blank excel file. I have data in the List object which is getting converted to xlsx stream. Not sure why the excel file is blank. Tried to save the stream to my local file explorer as well. Still, the issue persists. 

Below is the code:

 

  try
   {
Stream exportStream = exportFormat == SpreadDocumentFormat.Xlsx ? workOrderList.ToXlsxStream(columnsData, (string)options.title.ToString(), cellStyleAction: cellStyle) : workOrderList.ToCsvStream(columnsData);

Task.Factory.StartNew(() => AzureHelper.UploadReportOnCloud(exportStream,fileName, ConfigurationManager.AppSettings[Constant.REPORTATTACHMENTCONTAINER]));

}

            catch(Exception ex)
            {

            }

 

Please help me to resolve this issue.  

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Dec 2023
1 answer
52 views

Hello,

I have a corrupted XLSX file from CSV dataSource

With other CSV dataSource all is ok

In example in file-attach, I added CSV dataSource with corruption

There are 2 bad lines in generated XLSX file and CSV file have a good format !!!

It's not an issue with codepage or separator !

It's a projet DotNet Core 6 with last version 2023.2.713.20 of API

Do you have encountered this error already ?

Best regards

Cyril REILER

 

 

 

Cyril
Top achievements
Rank 1
Iron
 updated answer on 26 Sep 2023
1 answer
209 views


Hi all, 

I got some problems when I try to read my Excel file as below:

1. It skipped the null cells, it only read data at the cells having value. For example in my case, after reading cell 2 at row 2, it jumped to cell 14. 

2. It showed the error message "The given key '3' was not present in the dictionary." at cell 15

You can see my code, the Excel file I used, and the result in below

My code

@page "/testpage"
@using Telerik.Documents.SpreadsheetStreaming;
<div>
    @((MarkupString)(str.ToString()))
</div>


@code {
    private StringBuilder str = new StringBuilder();
    protected override void OnInitialized()
    {
        str = ReadData();
    }
    private StringBuilder ReadData()
    {

        try
        {
            string filename = ".\\Template.xlsx";
            using (FileStream fs = new FileStream(filename, FileMode.Open))
            {
                using (IWorkbookImporter workBookImporter = SpreadImporter.CreateWorkbookImporter(SpreadDocumentFormat.Xlsx, fs))
                {
                    foreach (IWorksheetImporter worksheetImporter in workBookImporter.WorksheetImporters)
                    {
                        foreach (IRowImporter rowImporter in worksheetImporter.Rows)
                        {
                            foreach (ICellImporter cell in rowImporter.Cells)
                            {
                                if(cell.Value!= null)
                                {
                                    str.Append(cell.Value.ToString());

                                }
                                else
                                {
                                    str.Append("NULL");
                                }
                                str.Append(",");
                            }
                            str.Append("<br/>");
                        }

                    }
                }
            }
            return str;
        }
        catch(Exception ex)
        {
            str.Append("<br/>");
            str.Append(ex.Message);
            return str;
        }

    }
}
 My Excel file as a picture below, I also attached my Excel in the question (Template.rar)

  The result when I run 

  Everyone who know how to fix it, please help me.

Thank you

Yoan
Telerik team
 answered on 04 Jul 2023
1 answer
66 views

I need to rotate the text vertically.

It seems the TextRotation is unavailable when using Telerik.Documents.SpreadsheetStreaming.SpreadCellStyle.

How do I apply text rotation to a style using SpreadsheetStreaming?

 

Thanks,

 

Jim

Anna
Telerik team
 answered on 28 Apr 2023
1 answer
48 views

Hello All, 
I am using Telerik.Documents.SpreadsheetStreaming assembly with Version 2020.3.1019.20. I just need how to assign text having hyperlink to ICellExporter object here. Please suggest me if there is any wrong here.

string policy = "<a href=\"https://www.termsfeed.com/blog/sample-terms-and-conditions-template/\">Policy Terms</a>";
string showText = "For necessary info, Please refer " + policy;
//rowExporter -> IRowExporter object here
using var cellExporter = rowExporter.CreateCellExporter();
cellExporter.SetValue(showText);

Thanks

Sam

Dimitar
Telerik team
 answered on 10 Mar 2023
1 answer
72 views

Hi,

I'm using IWorksheetExporter (Telerik.Documents.SpreadsheetStreaming library)  to create big Excel files, ~400 mb xlsx.

I need to add notes to header cells like what is available here https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/notes but it doesn't look to be available in the Streaming library.

I see two possible workarounds.

  1. Create my header row with RadSpreadProcessing and reopen the same file for the batch processing with the streaming dll. But I can't find how to append to a worksheet, the only thing that looks like appendable to an existing file is new worksheet.
  2. Create the big file with the streaming library and reopen it with RadSpreadProcessing to add the notes. What will be the performance hit to do that? Does opening an excel file load everything in memory? So saving it back will also recreate the whole file?
  3. Do you have another solution

NB. Trying to completely create this file via the RadSpreadProcessing library throw a "Stream was too long" from within the library while saving it.

NB. I'm using the latest version from the nuget stream.

Thanks

Nikolay Demirev
Telerik team
 answered on 13 Feb 2023
1 answer
79 views

Hello All,

I am using the RadSpreadStreamProcessing to export data to an Excel spreadsheet and I would like to know how to declare the column headers in the exported spreadsheet as Sortable/Filterable?  Is there an example that I can be pointed to?

Thanks for any help you can provide.

W

Tanya
Telerik team
 answered on 01 Nov 2022
3 answers
55 views

Hi all I have a problem during the import of an existing excel file with formula inside

(e.c.  IF(H1<>"";IF(J1="";"";INDEX(INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("Var_"&C1&"_"&G1&"_"&H1;" ";"hex20");"-";"hex2d");"(";"hex28");")";"hex29");"/";"hex2f");"+";"hex2b");"&";"hex26");".";"hex2e")&"_Daily");MATCH(J1;INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE("Var_"&C1&"_"&G1&"_"&H1;" ";"hex20");"-";"hex2d");"(";"hex28");")";"hex29");"/";"hex2f");"+";"hex2b");"&";"hex26");".";"hex2e")&"_Levels");0)));""

or

==EOMONTH(startdate;-1)

These formula are used in different cells in different sheets and when I try to bind the generated json to a spreadsheet component I received this error: 

  • {message: 'Expected op «,» but found sym «Var_» (input: _matr…"hex2b");"&";"hex26");".";"hex2e")&"_Service")"))', pos: 139}
    1. message: "Expected op «,» but found sym «Var_» (input: _matrix(\"INDIRECT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(\"Var_\"&C1;\" \";\"hex20\");\"-\";\"hex2d\");\"(\";\"hex28\");\")\";\"hex29\");\"/\";\"hex2f\");\"+\";\"hex2b\");\"&\";\"hex26\");\".\";\"hex2e\")&\"_Service\")\"))"
    2. pos: 139
    3. [[Prototype]]: H

     

    As posted in some forum  It seems due  to the culture used during excel generation (I tried different approach: attached a different culture to the current thread server side, force kendo core library to use a specific culture client side, force spreadsheet to use a specific culture server side).

    How can I resolved this issue?

    I did not found any working solution on line.

    Thank you in advanced

    Eleonora

Eleonora
Top achievements
Rank 1
Iron
 answered on 27 Oct 2022
1 answer
53 views

Used with Blazor, anyway we can get rid of this warning?

Telerik.Documents.SpreadsheetStreaming 2022.2.613 requires Telerik.Zip (= 2022.2.613) but version Telerik.Zip 2022.3.906 was resolved

Dimitar
Telerik team
 answered on 04 Oct 2022
1 answer
49 views

Are there any plans of making async functions in RadSpreadStreamProcessing?

When used in a server environment, that would increase throughput of requests a lot...

Dimitar
Telerik team
 answered on 26 May 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?