Quantcast
Channel: Open XML Format SDK forum
Viewing all 1288 articles
Browse latest View live

openxml doesn't retrieve the same value than what VBA gives

$
0
0

Hello,

I am using apache POI library to read Excel files from a Java program. I have the following issue with reading numbers :

I have the cell D5 that contains the formula "=3000000/D10" and D10 cell contains the formula "=1.41973/1.2939".
When I read this cell within VBA macro like this : Worksheets("My sheet").Cells(5, 4), I get 2734111.41555084 but when I read it via openxml, the cell contains here 2734111.4155508447 (see the extra 47), which is wrong.
I expect to get the same result as VBA gives.

So I've asked the POI team directly here but it happens that they use openxml and actually just read "correctly" what is being returned by Open XML. I could indeed reproduce the issue by reading the same file in VS with c# and directly with openxml sdk. 

As microsoft states here, we understand that Excel never gives more than 15 digits, so neither should openxml. With more than 15 '#', it should only add non-significative zeros.But in my case openxml gives 17 digits (2734111.4155508447) instead of the 15 that I am talking about (2734111.41555084).

Can this be corrected please ?

Regards,


OpenXML XLSX Validates but Error when opened

$
0
0

I am trying to generate a chart using the OpenXML SDK. My file validates using OpenXML SDK Productivity Tool, but still shows an error when opened. When opened in Excel, the repaired part (removed) is the drawing part (drawing.xml). Does anybody have any ideas why I am getting this error?

Drawing.xml

<?xml version="1.0" encoding="utf-8"?><xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"><xdr:twoCellAnchor><xdr:from><xdr:col>9</xdr:col><xdr:colOff>581025</xdr:colOff><xdr:row>17</xdr:row><xdr:rowOff>114300</xdr:rowOff></xdr:from><xdr:to><xdr:col>17</xdr:col><xdr:colOff>276225</xdr:colOff><xdr:row>32</xdr:row><xdr:rowOff>0</xdr:rowOff></xdr:to><xdr:graphicFrame macro=""><xdr:nvGraphicFramePr><xdr:cNvPr id="2" name="Chart 1" /><xdr:cNvGraphicFramePr /></xdr:nvGraphicFramePr><xdr:xfrm><a:off x="0" y="0" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" /><a:ext cx="0" cy="0" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" /></xdr:xfrm><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/chart"><c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1" /></a:graphicData></a:graphic></xdr:graphicFrame><xdr:clientData /></xdr:twoCellAnchor></xdr:wsDr>

Chart.xml

<?xml version="1.0" encoding="utf-8"?><c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><c:date1904 val="0" /><c:lang val="en-US" /><c:roundedCorners val="1" /><c:style val="2" /><c:chart><c:autoTitleDeleted val="1" /><c:plotArea><c:layout /><c:scatterChart><c:scatterStyle val="lineMarker" /><c:varyColors val="0" /><c:ser><c:idx val="0" /><c:order val="0" /><c:tx><c:v>5</c:v></c:tx><c:smooth val="1" /></c:ser><c:dLbls><c:showLegendKey val="0" /><c:showVal val="0" /><c:showCatName val="0" /><c:showSerName val="0" /><c:showPercent val="0" /><c:showBubbleSize val="0" /></c:dLbls><c:axId val="811191040" /><c:axId val="81120640" /></c:scatterChart><c:catAx><c:axId val="81119104" /><c:scaling><c:orientation val="minMax" /></c:scaling><c:delete val="1" /><c:axPos val="b" /><c:majorTickMark val="cross" /><c:minorTickMark val="cross" /><c:tickLblPos val="nextTo" /><c:crossAx val="81120640" /><c:crosses val="autoZero" /><c:auto val="1" /><c:lblAlgn val="ctr" /><c:lblOffset val="100" /><c:noMultiLvlLbl val="1" /></c:catAx><c:valAx><c:axId val="81120640" /><c:scaling><c:orientation /></c:scaling><c:delete val="1" /><c:axPos val="l" /><c:majorGridlines /><c:numFmt formatCode="General" sourceLinked="1" /><c:majorTickMark val="cross" /><c:minorTickMark val="cross" /><c:tickLblPos val="nextTo" /><c:crossAx val="81118104" /><c:crosses val="autoZero" /><c:crossBetween val="between" /></c:valAx></c:plotArea><c:legend><c:legendPos val="r" /><c:layout /><c:overlay val="1" /></c:legend><c:plotVisOnly val="1" /><c:dispBlanksAs val="zero" /><c:showDLblsOverMax val="1" /></c:chart><c:printSettings><c:headerFooter /><c:pageMargins l="0.7" r="0.7" t="0.75" b="0.75" header="0.3" footer="0.3" /><c:pageSetup /></c:printSettings></c:chartSpace>


How to suppress warning while opening Excel *.xls file created using Open XML SDK on office 2013 client machines?

$
0
0

Hi 

We have ASP.Net MVC application. There is excel file download functionality supported in our web application.

Previously *.xls file was created using Excel Application and was getting downloaded, but as Server side Automation is not recommended for many reasons, I am doing one POC application which creates Excel file *.xls using Open XML SDK 2.0 ( I have used Productivity Tool to generate the code to create this file on Server).

Now File is getting downloaded without any problem, as ActionResult returns following code.

return File(fileBytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "TestFile.xls"); 

Now when user opens this downloaded TestFile.xls file, it gives him the warning that "The file format and extension of 'TestFile.xls' don't match. The file could be corrupted or unsafe. Unless you trust the source, don't open it. Do you want to open it anyway? Yes/No/Help options.

As we need to support Office 2007 as well as Office 2013 clients, I have to download *.xls file. ( If I download *.xlsx file, it gives error and file cannot be opened for office 2007 clients)

Please advise on how to suppress or get rid of the warning message for Office 2013 clients.

Best Regards

 

How to optimize fetching of data from a Excel file which has more than 15k rows and only two columns.

$
0
0

Hi,

I am trying to create a dictionary from a Excel file with column 1 as Key and column 2 as Value.

I have used Open XML format,DOM method  to achieve the same but it's taking too much around 5 mins for creating a dictionary of length 15k.

Here is the code for the same.

private void refreshDictionaryOpenXML()
        {
            lblRefreshMessage.Text="Refreshing Dictionary,Please Wait...";
            btnTranslate.Enabled = false;

            string strDoc = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\dict1.xlsx";

            using (SpreadsheetDocument spreadsheetDocument =
                        SpreadsheetDocument.Open(strDoc, false))
            {
                WorkbookPart workbookPart = spreadsheetDocument.WorkbookPart;
                WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();

                SheetData sheetData = worksheetPart.Worksheet.GetFirstChild<SheetData>();
                int str;
                int keyVal;

                try
                {

                    foreach (Row r in sheetData.Elements<Row>())
                    {
                        int colNo = 1;
                        string strString="";
                        string keyString = "";
                        foreach (Cell c in r.Elements<Cell>())
                        {
                            if (colNo==1)
                            {
                                if (c.CellValue != null && Int32.TryParse(c.InnerText, out str))
                                {
                                }
                                else
                                {
                                    str = -1;

                                }

                                if (str != -1)
                                {

                                    strString = GetSharedStringItemById(workbookPart, str);
                                    byte[] bytes = Encoding.Default.GetBytes(strString);
                                    byte[] devBytes = Encoding.Convert(Encoding.Default, encoding, bytes);
                                    strString = encoding.GetString(devBytes);

                                }

                            }
                            else if(colNo==2)
                            {
                                if (c.CellValue != null && Int32.TryParse(c.InnerText, out keyVal))
                                {
                                }
                                else
                                {
                                    keyVal = -1;

                                }

                                if (keyVal != -1)
                                {
                                    keyString = GetSharedStringItemById(workbookPart, keyVal);

                                }
                            }
                            colNo += 1;
                        }

                        if (!translatorDictionary.ContainsKey(strString))
                        {
                            translatorDictionary.Add(strString, keyString);

                        }

                    }
                }
                catch(Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            lblRefreshMessage.Text = "Dictionary Refreshed";
            btnTranslate.Enabled = true;
        }

Please let me know how can this be optimized more for faster operation.


Point5Nyble

Need Hierarchy of PresentationML

$
0
0

Hi,

I want to know a hierarchy of PresentationML for a .pptx where i have one title, one logo image place holder, one text body and one Image Place holder.

i have seen lot of links but were not able to understand the actual hierarchy of all the elements in presentationML. Please provide us the explanation on this.

Apart from it, can you tell us the approach if i want to add a dynamic table into PresentationML then how we can do this using C#?


ITneer Inc

Spreadsheet cells do not use correct Fill definition

$
0
0
I am creating an Excel spreadsheet for Office 2010.   Note, I am using the SAX method as the amount of data will be very large.   I am having a problem will Fill objects.   I have defined two:

fills = new Fills();

// FillID 0.

fill = new Fill();
fill.PatternFill = new PatternFill();
fill.PatternFill.PatternType = PatternValues.None;
fills.Append(fill);

// FillID 1.

fill = new Fill();
fill.PatternFill = new PatternFill();
fill.PatternFill.PatternType = PatternValues.Solid;
fill.PatternFill.ForegroundColor = TranslateForeground(SD.Color.Green);
fill.PatternFill.BackgroundColor = TranslateBackground(SD.Color.Magenta);
fills.Append(fill);
fills.Count = (UInt32) fills.ChildElements.Count;

However, I don't get this kind of fill.   When I use a FillId of 1 on any of the CellFormats all I get is a black and white grid pattern.   I can change PatternType of to any value, including None, and I will still get a black and white grid pattern.   Any thoughts or ideas?  

All the FontIds and NumberFormatIds work as expected, but the FillId will not result in the correct fill style in the Excel spreadsheet.   The Excel file opens without error.   Its just that the cells are not filled correctly.   When I save the Excel file as an XML file, all of the fill specifications (<Interior> node) look like this, regardless of the specification I have coded:

   <Style ss:ID="s15">
    <Font ss:FontName="Calibri" ss:Size="11"/>
    <Interior ss:Color="#FFFFFF" ss:Pattern="Gray125" ss:PatternColor="#000000"/>
   </Style>

What is the best solution to create power point document programmatically?

$
0
0

I'm new to Open Xml SDK. I want to dynamically create PPTX document via C#. Is OpenXml SDK the good choice for creating power point document? 

On MSDN link https://msdn.microsoft.com/en-us/library/office/gg278317.aspx, it tells how to create a pptx from the scratch. It only has one slide without any content. The code is over 250 lines. It has to create each xml element required, like ColorScheme, Dark1Color,  CommonSlideData,  ApplicationNonVisualDrawingProperties, etc.

Then I found sample code using Office interops. To create one slide pptx with some notes, it only uses 40 lines of code. It only uses Microsoft.Office.Interop.PowerPoint.Presentation, Slides, _Slide, TextRange, CustomLayout. I don't need to deal with all those xml elements.

So I wonder which one is the better choice for creating pptx programmatically? I see everybody mentions open xml sdk. But creating a complex power point document programmatically requires a very length code. Do we have other better solutions that just deal with objects directly without touching any xml elements?

Thanks for your input!!!

How to create Theme part using xml?

$
0
0

I have seen most of theme part is Office Theme. Since I have the whole xml for this theme, is there any API I can use to create a whole theme part with xml?

Thanks in advance!!!


Get file property value by name using Reflection on _oledocumentproperties.SummaryProperties instance

$
0
0

Hello,

my question is the following one:

Investigating on the web, the only examples I found to get a file built-in property value like 'Author', 'DateLastSaved' or 'Company' look like this:

string filePath=@"C:\Users\ME\Desktop\PaperSpecs.docx";DSOFile.OleDocumentProperties file =newDSOFile.OleDocumentProperties();
file.Open(filePath,false,DSOFile.dsoFileOpenOptions.dsoOptionDefault);Console.WriteLine("Author: "+ file.SummaryProperties.Author.ToString());Console.WriteLine("DateLastSaved: "+ file.SummaryProperties.DateLastSaved.ToString());Console.WriteLine("Company: "+ file.SummaryProperties.Company.ToString());

Let's consider to retrive a value by the property name... I mean to implement a function with two parameters: i) aDSOFile.OleDocumentProperties instance; ii) the property name (string propName). My first idea, but I think the "most stupid way" also, consist in implementing a switch-case that check thepropName value and then, depending on that value, returns the related_oledocumentproperties.SummaryProperties property... that is:

...string val=null;switch(propName){casecase"Author":
   val= file.SummaryProperties.Author.ToString();break;casecase"DataLastSaved":
   val= file.SummaryProperties.DataLastSaved.ToString();break;...default:thrownewException("Property not found");}return val;

But I don't like this solution, it is "too long" to write and "not easy" to mantain. Maybe there is a better way to implement this function... for example using the power of C# Reflection! I'm not very good to handle Reflection but I've tried to do something like that:

...Type t = file.SummaryProperties.GetType();System.Reflection.PropertyInfo p = t.GetProperty(propName);object value = p ==null?null: p.GetValue(file.SummaryProperties,null);return value.ToString();

The problem is that the p instance is always null!!!

My question is: Do you know a better way to implement the function that I'm looking for? Or can you adjust my last code hint to resolve my problem through Reflection? Thanks guys!!!

How to package folders and xml files to pptx format?

$
0
0

I have unzipped .pptx file and modified minor content. I want to zip them up again to create a new pptx file. How can I do that? Is this doable?

Thanks in advance!!!

OpenXML Excel file corruption, DataValidations

$
0
0

I am creating an excel file using OpenXML SDK 2.0 from a WPF application. The excel file has multiple sheets, data validations for dropdown cells, Formulas, and StyleSheets applied. It works fine creating excel rows of around 17,500 in Sheet1 and 17,500 in Sheet2 as well. However, when the number of rows reaches 25,000 for both Sheet1 and Sheet2 the file gets corrupted i.e. while opening the file it gives an errror "We found a problem with the content in file.xlsx. Do you want to recover as much as we can?" If I recover the file the data is still there for all 25,000 rows in both the sheets however the datavalidations i.e. dropdowns are not applied for any of the cells. The recovery log is as follows, while the repair message in the screenshot.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error946360_01.xml</logFileName><summary>Errors were detected in file 'D:\file.xlsx'</summary><removedFeatures summary="Following is a list of removed features:"><removedFeature>Removed Feature: Data validation from /xl/worksheets/sheet.xml part</removedFeature></removedFeatures><repairedRecords summary="Following is a list of repairs:"><repairedRecord>Repaired Records: Cell information from /xl/worksheets/sheet.xml part</repairedRecord><repairedRecord>Repaired Records: Cell information from /xl/worksheets/sheet2.xml part</repairedRecord></repairedRecords></recoveryLog>

What I am surprised is that 25,000 is not a huge number for corrupting an excel file. The content is the same across all the rows i.e. it has the same content for all the rows, so it should not be something to do with the content.

The file size reaches approximately 1.8 MB

Any ideas/suggestions what could be going wrong here?


mp4 video doesn't play in PowerPoint 2016

$
0
0

I'm using Windows 10 and Office 2016. 

I created a PPTX with an embedded mp4 using PowerPoint. It plays fine without any problem. Then I used OpenXml SDK2.5 productivity tool to generate C# code based on this pptx. Running the code generated another pptx file. I opened it and tried to play the video. It didn't play. I opened it in PowerPoint and tried to play it there. It showed "Codec Unavailable". Why? How do I insert video via OpenXml SDK 2.5? Why code generated by productivity tool doesn't work?

Thanks in advance!!!


How to open an existing Excel worksheet and set column width to best fit Using openXML SAX in C# ?

$
0
0

How to open an existing Excel worksheet and set column width to best fit Using openXML SAX in C# ?  I need to iterate the columns to set them to best fit.

I found many examples online to set the column width when creating the column but not for existing.

Thanks.

Danyeung

How to add a Horizontal Bar Chart to Word.docx to be updated in code?

$
0
0

Hi,

How can a chart be put onto openxml Word doc?  I can create a blank or dummy chart to put there and try to sort thru to get into the values, but how is it done?

Goal:  to add a 1-100% stacked Horiz bar chart with 3 series.  

I have a docx used as a template, i copy this into a memory stream, then search into that to find elements.   So far adding a Chart has failed, the resulting docx is "corrupt".  To find the location to add something, I had added string literals in the word doc but made the font invisible.

so "put_item_here" is tiny and white as the background.

foreach (DocumentFormat.OpenXml.OpenXmlElement xde in bodyDoc)
     {
        if (xde.InnerText == "put_item_here")
          { xde.InsertAfterSelf(GenerateTheChart());
          }
So the problem is HOW to add a Chart?  I made the method GenerateTheChart(), I took a blank Word doc and added a chart, saved it, opened in OpenXml sdk tool to get at the code, but putting this into the method worked for Tables, but its not working for the chart.

Is it posible to create a vba/macro using Open Xml Format and open xlsm files

$
0
0

Hi,

We're trying to use the Open Xml Format Library for generating excel documents. So we would like some infomation and specifications about Open Xml Format.

What we want to do, is to write the vba Macro statically from c#, and then add them to an excel document without using interop.

And a second thing we are wondering about is, whether it is even posible to open a .xlsm in Open Xml Format?

Hope you can help with these questions.

Best Regards

Joakim


Chart doesn't refresh without user interaction after changing embedded excel data linked to chart

$
0
0

Hello,

I am really falling short with faith that there is solution to my problem.

1.) I have prepared PPTX file

This file contains few slides with text placeholders, tables and charts.

2.) Updating placeholders, charts and tables.

I open load and create copy of this file using OpenXML.

The placeholders are filled with their values from runtime, same as tables.

3.) Charts are different, created using embedded excel datasheet.

Embedded sheet data is opened and the values updated.

4.) Save and serve file.

PROBLEM IS:

To actually see resulting chart, I need to right-click every chart and press edit data. As soon as Excel loads, the chart is redrawn and looks perfect.

I have found some solutions using macro with ActivePresentation.updateLinks, but for me its not plausible, because I cannot process PPTM (macro enabled presentation) using OpenXML?

The problem with user interaction is, that there is supposed to be more charts than one. If there is no way how to process the presentation so it refreshes its charts automatically, is there any possibility to achieve this by user interaction for all charts at once directly in PowerPoint?

Thank you in advance for any useful information provided.


Add hyperlink

$
0
0

ok seriously this is the 4th day in a row that ive asked a question, but ive been googling and searching the sdk documentation and cant find out how to do this.

 

I know what markup is required to add a hyperlink.

 

I have this in the document

Code Snippet

test@domain.com

 

 

And I need something like this in the document.xml.rels file

 

Code Snippet

<Relationship Id=""rId4"" Type=""http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"" Target=""mailto:test@domain.com"" TargetMode=""External"" />

 

 

Now how do I get the markup into the document.xml.rels file.  It looks like the rels file is generated by the packaging class and you just need to add a new document part.  I didnt see any relationship part or hyperlink part.

Excel XML file saving as .xls or .xlsx programmatically

$
0
0

I have a unique requirement that I have a excel xml file(file extension is .xml and looks like xslt when I open in notepad). It opens in excel and displays the table header and rows correctly of the data type as text, date, hyperlink.

I want to convert this as .xls or .xlsx programmatically. Note that I am able to save the file as .XLSX manually when I open .xml file and go with Save As option.

It looks like I cant read .ReadXML as the data is not well formed. I am checking an option. I saw the Microsoft. Interop.excel assembly based  app can be used to convert but I cant install Office on the server hence it always gives me error referring dll.

Any assistance with sample code will be greatly appreciated.

Thanks

Shri

Formatting text and columns in Open XML Excel

$
0
0

I'm brand new to Open XML for Excel and am finding that I spend most of my time spinning my wheels with it (Has anyone else had this experience?)

I'm trying to convert some code that used to use interop Excel objects and will now use Open XML. I am running into some very serious roadblocks.

Most notably:
I can create a new Excel document with one sheet named "Sheet 1".I can populate it with data from a DataSet . What I need to do is:
1. Format the columns (width, data type, font)
2. Utilizing NumberingFormats in StyleSheets

Format the columns. I haven't found any examples of formatting existing columns, only adding new ones. If I add the new columns and save the document, it gets into a corrupted state)

Utilizing NumberingFormats.  I tried accessing the pre-defined formats (ID 0 - 49) without success.  I found an example where someone added custome ones starting at ID = 200.  I tried that and still it won't work.  The CellFormat is being utilized because the text alignment is being recognized but not the NumberFormat.

If anybody has a good (and I stress GOOD) tutorial on Open XML or can share their experiences with me, that would be greatly appreciated.

Code snippets:

1. Date NumberingFormat: private NumberingFormat dateFmt     = new NumberingFormat () { NumberFormatId = 200, FormatCode = "mmm dd, yyyy" };

2. Adding to StyleSheet:  stylesPart.Stylesheet.NumberingFormats.Append ( dateFmt );

3. Date formatting (index 9):
new CellFormat { Alignment = new Alignment () { Horizontal = HorizontalAlignmentValues.Right,  Vertical = VerticalAlignmentValues.Center },
FontId = 0, FillId = 0, BorderId = 0, NumberFormatId = 200, ApplyAlignment = true, ApplyNumberFormat = true },

4. numFmts via Productivity Tool:

namespace GeneratedCode
{
    public class GeneratedClass
    {
        // Creates an NumberingFormats instance and adds its children.
        public NumberingFormats GenerateNumberingFormats()
        {
            NumberingFormats numberingFormats1 = new NumberingFormats(){ Count = (UInt32Value)3U };
            NumberingFormat numberingFormat1 = new NumberingFormat(){ NumberFormatId = (UInt32Value)200U, FormatCode = "mmm dd, yyyy" };
            NumberingFormat numberingFormat2 = new NumberingFormat(){ NumberFormatId = (UInt32Value)201U, FormatCode = "$##,##0.00" };
            NumberingFormat numberingFormat3 = new NumberingFormat(){ NumberFormatId = (UInt32Value)202U, FormatCode = "##,##0" };

            numberingFormats1.Append(numberingFormat1);
            numberingFormats1.Append(numberingFormat2);
            numberingFormats1.Append(numberingFormat3);
            return numberingFormats1;
        }
    }
}

5. Generated code for the Date Format:

namespace GeneratedCode
{
    public class GeneratedClass
    {
        // Creates an NumberingFormat instance and adds its children.
        public NumberingFormat GenerateNumberingFormat()
        {
            NumberingFormat numberingFormat1 = new NumberingFormat(){ NumberFormatId = (UInt32Value)200U, FormatCode = "mmm dd, yyyy" };
            return numberingFormat1;
        }
    }
}

6. Getting the particular cell:

        private Cell CellInfo ( string headerColumn, int index, UInt32Value styleIndex )
            {
            Cell c          = new Cell () { StyleIndex = styleIndex };

            // Attempts at making the DataType property based on the styleIndex.

            //if ( styleIndex < 9 )
            //    c.DataType     = CellValues.InlineString;
            //else
            //    {
            //    if ( styleIndex == 9 )
            //        c.DataType = CellValues.Date;
            //    else
            //        c.DataType = CellValues.Number;
            //    }

            c.DataType      = CellValues.InlineString;
            c.CellReference = headerColumn + index;

            return c;
            }

Jerry Scannell

Openxml c# to copy template and create multiple pages

$
0
0

I am planning to use openXML <g class="gr_ gr_31 gr-alert gr_spell undefined ContextualSpelling ins-del multiReplace" data-gr-id="31" id="31">sdk</g> for search and replace in a template. I'do like to create the page for each member in the list. Basically, I need to replicate the same page from the template. I have done <g class="gr_ gr_37 gr-alert gr_gramm undefined Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="37" id="37">simple</g> search and replace. However, this little complex one for which I need some sample examples.

Here is my requirement:

I have a template which has the content with <g class="gr_ gr_32 gr-alert gr_spell undefined ContextualSpelling ins-del" data-gr-id="32" id="32">place holders</g>. There is a table with 3 columns in it and I need to replace with different values for each column like first name, last name and etc. The number of rows may vary anywhere from one to 200. So technically this may go beyond one page. If it exceeds more than one page, then I need the table header to repeat<g class="gr_ gr_34 gr-alert gr_gramm undefined Grammar multiReplace" data-gr-id="34" id="34">in</g> the next page too. I want to copy the same template on every page and replace the <g class="gr_ gr_33 gr-alert gr_spell undefined ContextualSpelling ins-del" data-gr-id="33" id="33">place holder</g>. <g class="gr_ gr_43 gr-alert gr_gramm undefined Punctuation multiReplace" data-gr-id="43" id="43">Basically</g> create a single document with multiple pages each page for one member.

Please provide me with the example. Appreciate the help. Thanks.

Viewing all 1288 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>