Telerik Forums
Telerik Document Processing Forum
3 answers
381 views

Hallo,

when i read the result of a cell with a formular how has a function (like SUM()) or a referenz (sheetname!Range) linked to a worksheet (itself or another) in the workbook the result (.GetResultValueAsString ) ist "0" or a text (the formular itself) and not the result. Simple formulars related to cells in the worksheet are ok.

Example:

The cell formular looks like this:

1. =SUMME(L23:L30) ==> GetResultValueAsString result = "0"

2. {=WENNFEHLER(INDEX(Bestellliste!E:E;KKLEINSTE(WENN(Bestellliste!$A$1:$A$1131="x";ZEILE($1:$991));ZEILE(A3)));"")} ==> GetResultValueAsString result = "=WENNFEHLER(INDEX(Bestellliste!E:E;KKLEINSTE(WENN(Bestellliste!$A$1:$A$1131="x";ZEILE($1:$991));ZEILE(A3)));"")"

VB code:
Dim iCellValue As ICellValue
iCellValue = TryCast(workbook.ActiveWorksheet.Cells(row, col).GetValue().Value, ICellValue)
If iCellValue IsNot Nothing Then
    Dim format As CellValueFormat = workbook.ActiveWorksheet.Cells(row, col).GetFormat().Value
    Dim valueAsString As String = iCellValue.GetValueAsString(format)
    'valueAsString
    Dim resultValueAsString As String = iCellValue.GetResultValueAsString(format)
    'resultAsString
    Dim valueType As CellValueType = iCellValue.ValueType
    'valueType = Formula      ' ==> allways Text{4} with komplex formular
    'resultValueType = Number
    Dim resultValueType As CellValueType = iCellValue.ResultValueType
End If

DLL Version: 2015.2.728.40

What's wrong? Are their any restriction to resolve formulars?

 

Regards

Harald

 

 

 

Deyan
Telerik team
 answered on 16 Dec 2016
3 answers
616 views

I'm trying to zip a PDF file, it creates zip file correctly, but if I try to open compressed PDF file, it show me error message "Corrupted file" (I'm trying to open by my PDF reader), where I wrong?

using (Stream stream = File.Open(fileFullName, FileMode.Create))
                    {
                        using (ZipArchive archive = new ZipArchive(stream, ZipArchiveMode.Create, false, null))
                        {
                            using (ZipArchiveEntry entry = archive.CreateEntry(fi.Name))
                            {
                                var writer = new StreamWriter(entry.Open());
 
                                using (Stream streamFileToZip = File.Open(fi.FullName, FileMode.Open))
                                {
                                    var buffer = new byte[4096];
                                    int sourceBytes = 0;
                                    do
                                    {
 
                                        sourceBytes = streamFileToZip.Read(buffer, 0, buffer.Length);
                                        writer.Write(buffer);
 
                                    } while (sourceBytes > 0);
 
                                }
 
                                writer.Flush();
                            }
                        }
                    }
Dario Concilio
Top achievements
Rank 2
 answered on 06 Dec 2016
1 answer
554 views

Hi !

I searching another way to generate my PDF document by WordsProcessing.

Compositing it and convert to PDF

After install by Configure project (CfgProject.png) the Document.Flow (RadWordsProcessing) when i want convert it like this sample :

Telerik Sample export to PDF

the namespace "Telerik.Windows.Documents.Flow.FormatProviders.Pdf" is not found

The dll wasn't copied by Configure project ?! (FormatProvidersPdf.png)

it's a bug ? why ?

 

Thanks.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Dec 2016
2 answers
501 views

Hello,

Iam creating a pdf document wherein iam trying to set the size of the RadFixedPage object but the size property is showing as 

page.Size=new System.Windows.Size()

instead of page.Size = new Size();

What am i missing ? Any reference? 

I have already included the below references on my aspx page 

using System.Windows;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export;
using Telerik.Windows.Documents.Fixed.Model;
using Telerik.Windows.Documents.Fixed.Model.ColorSpaces;
using Telerik.Windows.Documents.Fixed.Model.Editing;
using Telerik.Windows.Documents.Fixed.Model.Editing.Flow;
using Telerik.Windows.Documents.Fixed.Model.Fonts;
using Telerik.Windows.Documents.Fixed.Model.Graphics;

 

Thanks in Advance

Sushanth.B

Martin Ivanov
Telerik team
 answered on 02 Dec 2016
3 answers
947 views

Hi from France ! (and excuse me for my bad english)

After 3 days on RadFixedDocument to make a PDF file, i need help !

I must make a PDF File based on my Asp.net Vb.net website (attached file)

i must make a document with "same" design : Landscape document and grids on left and on right

Dim document As New Telerik.Windows.Documents.Fixed.Model.RadFixedDocument
document.DocumentInfo.Author = "(c) Francelot"
document.DocumentInfo.Title = "Bilan Gestion"
 
 
Dim ex As New Telerik.Windows.Documents.Fixed.Model.Editing.RadFixedDocumentEditor(document)
 
ex.SectionProperties.PageRotation = Telerik.Windows.Documents.Fixed.Model.Data.Rotation.Rotate90
ex.InsertSectionBreak()
ex.InsertRun("TEST")
 
ex.InsertLine("Bilan Gestion")
 
ex.Dispose()

 

After this i got landscape document but my text is right to left (write not landscape, just rotate page ...) 

 

Thank for your help !

Vincent.

Martin Ivanov
Telerik team
 answered on 01 Dec 2016
1 answer
305 views

I'm currently using Telerik.Windows.Zip 2016.2.606.40.

Are there any file size limits, either to individual files in a ZIP or to the ZIP as a whole?

I'm getting an exception "Relative offset of the Central Directory Start is too big" while trying to process a large (~3GB) stream.

 

Thanks.

Tanya
Telerik team
 answered on 09 Nov 2016
1 answer
225 views

Hi,

Is it possible to export Arabic characters using Telerik Document Processing libraries ??

Tanya
Telerik team
 answered on 08 Nov 2016
5 answers
265 views

Hi;

I'm having problems, when I try to export with HtmlFormatProvider the OpenOffice/LibreOffice docx files.

If the file is created with MSWord there's no problems, all works fine, the problem is with LibreOffice/Openoffice generated-documents.

Please, I need help 'cause some of my customers uses LibreOffice to create the docx documents.

+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++

                docxProvider = new DocxFormatProvider();
                htmlProvider = new HtmlFormatProvider();

                if(this._DocXByteArray == null)
                    this._DocXByteArray = System.IO.File.ReadAllBytes(this._DocXPath);

                document = docxProvider.Import(this._DocXByteArray);
                        
                htmlProvider.ExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
                htmlProvider.ExportSettings.ImagesExportMode = ImagesExportMode.Embedded;
                htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Embedded;
                        
                string html = htmlProvider.Export(document); //heres crash with the down error trace

+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++

I'm always getting this error

++++++++++++++++++++++++ ERROR TRACE ++++++++++++++++++++++++

  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.GetDefaultStyleId(IHtmlExportContext context, String& styleId)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.CopyStyleFrom(IHtmlExportContext context, IElementWithStyle element)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.OnBeforeWrite(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.WriteContent(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.ExportDocumentFragment(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.Export(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
  at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
  at Telerik.Windows.Documents.Common.FormatProviders.TextBasedFormatProviderBase`1.Export(T document)

++++++++++++++++++++++++ END ERROR TRACE ++++++++++++++++++++++++

 

Thx

Mihail
Telerik team
 answered on 03 Nov 2016
1 answer
96 views
Hi;
I'm having problems, when I try to export with HtmlFormatProvider the OpenOffice/LibreOffice docx files.
If the file is created with MSWord there's no problems, all works fine, the problem is with LibreOffice/Openoffice generated-documents.
Please, I need help 'cause some of my customers uses LibreOffice to create the docx documents.
+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++
                docxProvider = new DocxFormatProvider();
                htmlProvider = new HtmlFormatProvider();

                if(this._DocXByteArray == null)
                    this._DocXByteArray = System.IO.File.ReadAllBytes(this._DocXPath);

                document = docxProvider.Import(this._DocXByteArray);
                        
                htmlProvider.ExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
                htmlProvider.ExportSettings.ImagesExportMode = ImagesExportMode.Embedded;
                htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Embedded;
                        
                string html = htmlProvider.Export(document); //heres crash with the down error trace
+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++
I'm always getting this error
++++++++++++++++++++++++ ERROR TRACE ++++++++++++++++++++++++
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.GetDefaultStyleId(IHtmlExportContext context, String& styleId)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.CopyStyleFrom(IHtmlExportContext context, IElementWithStyle element)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.OnBeforeWrite(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.WriteContent(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.ExportDocumentFragment(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.Export(IHtmlWriter writer, IHtmlExportContext context)
  at Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
  at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
  at Telerik.Windows.Documents.Common.FormatProviders.TextBasedFormatProviderBase`1.Export(T document)
++++++++++++++++++++++++ END ERROR TRACE ++++++++++++++++++++++++

Thx
Mihail
Telerik team
 answered on 01 Nov 2016
1 answer
191 views
For example if I have a CellSelection coordinates how can I retrieve the values from all cells and move it like a cut and paste text in another part of my export excel file? 
Boby
Telerik team
 answered on 01 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?