PTWC 2.2 and Export Datagrid to Excel

I have a portlet with an Image Button control that will export a Datagrid to Excel. Using the PT Web controls 2.2 I get a JavaScript Error (Object is Null or Nothing). It works fine outside of the portal. My current work-around is to use an IFrame. Has anyone else encountered this?
Paul

Have a look at this.
http://www.cristalab.com/tips/exportar-datos-de-flex-a-excel-c70300l/

Similar Messages

  • Unexplained Error while Exporting Datagrid to Excel

    Everything else seems to work ok (e.g. paging, master/detail functions, etc.) but the Export Datagrid to Excel isn't. I get the following:
    ErrorWe Recommend:Refreshing the page.Contacting your Portal administrator if problems persist.Accessing this Portlet at a later time.
    I am exporting it out as an attachment so Excel opens for the user. It works fine outside of the portal. Anyone know what I'm doing wrong?
    Paul

    I'm using the standard Microsoft ASP.NET 1.1 Datagrid control. Here is my routine that gets launched from a LinkButton Control...
    privatevoidExportDataGrid(){Response.Clear();Response.Buffer= true;Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("Content-Disposition", "attachment;filename=Lead_FeedBack.xls");Response.Charset = "";
    this.EnableViewState = false; System.IO.StringWriter oStringWriter = newSystem.IO.StringWriter(); System.Web.UI.HtmlTextWriter oHtmlTextWriter = newSystem.Web.UI.HtmlTextWriter(oStringWriter);
    // Create a DataGrid control and Pass content from first DataGrid to itDataGrid DataGrid2 = newDataGrid();DataGrid2 = DataGrid1;this.RemoveControls(DataGrid2);
    //Lets make it a generic looking spreadsheetDataGrid2.HeaderStyle.BackColor = Color.LightGray;DataGrid2.AlternatingItemStyle.BackColor = Color.White;DataGrid2.PagerStyle.BackColor = Color.LightGray;DataGrid2.HeaderStyle.Font.Bold = true;DataGrid2.RenderControl(oHtmlTextWriter);
    Response.Write(oStringWriter.ToString()); Response.End(); }
    Paul

  • Export DataGrid to Excel

    Hello,
    I populated a datagrid using a query. Now I want to export
    the content of the datagrid to Excel.
    Is this possible?
    I don't want to use the query to Export to Excel.
    I want to Export from the datagrid itself.
    Anyone has an idea how to export my datagrid to Excel in
    flex?
    Thx

    Code is below. I simplified it a bit for this post, I hope it
    still works ;-)
    Couple of assumptions
    1) My dataproviders are XMLListCollections - you have to
    adapt that if you are using something else
    2) I set a dataField on the datagrid columns for the XML
    attribute I want to read
    I am sure there are better / more generic ways of doing this,
    but this works for me right now and I blew a lot of time on this
    when I first came across the problem. If you find a better solution
    let me know ;-)
    public static function
    copyGridData(srcDataGrid:DataGrid):void {
    var outputA:Array = new Array();
    // header
    var headerA:Array = new Array();
    var columns:Array = srcDataGrid.columns;
    for each (var col:DataGridColumn in columns ) {
    headerA.push(col.headerText);
    outputA.push(headerA.join("\t"));
    // data
    var data:XMLListCollection =
    XMLListCollection(srcDataGrid.dataProvider);
    for each (var r:XML in data) {
    var rowA:Array = new Array();
    for each (var col2:DataGridColumn in columns) {
    if (col2.dataField != null) {
    rowA.push(r.attribute(col2.dataField.substr(1,col2.dataField.length-1)));
    } else {
    rowA.push("");
    outputA.push(rowA.join("\t"));
    // copy onto the clipboard
    System.setClipboard(outputA.join("\n"));
    Alert.show("Data copied to the clipboard.\nOpen target
    application (e.g. Excel) and paste data.", "Data Copy");

  • How to export datagrid to Excel

    I want to export data from a datagrid to Excel. I heard about
    the use of Clipboard, but can't figure out how to use it.
    Can anyone give me a nice solution, how to do this?
    Thx

    Hi michael,
    I'm trying to do this: in my application I have a datagrid
    and I have a button to export the datagrid in Excel. When the user
    click on the button, I need to open a new html window where the
    data are showed in the excel format (may be also csv).
    I read that you have a solution to show the excel document.
    Are you available to share an example of the code or provide me a
    link on the web where I can find it?
    Any suggestion will be appreciated.
    Thank you very much.
    Regards

  • Export DataGrid into Excel

    Hi All,
       Can anybody share the code to export datagrid into an excel ?
    Thanks,
    Ravisha

    you can send the datagrid rows/values to server side and use some serverside script to create excel.

  • How to i write a script that makes multiple selections in a pdf and exports them to excel?

    I have a large number of PDFs
    Not all the PDFs contain information we need. We want to be able to automate a script that extracts certain info from the PDFs and opens them in a certain format in excel.
    Acrobat allows me to make a single selection and export as excel.
    How do i export multiple parts to excel from the pdfs and ensure that the resulting excel is in a format that i can use without much fixing needed (e.g. merged cells)?

    This type of process can't really be done using JavaScript. You would need to read the contents of the file, word by word, decide (based on some logic) what data to extract, and then collect it and at the end export to a plain-text file. Not a simple process...

  • Error message using SQL import and Export Wizard with Excel spread sheet

    I am trying to import an Excel spreadsheet using the Import export wizard that is provided with SQL 2014.  
    Everything seems to set up OK but then when I go to do the transfer "error message" comes up saying:
    External Table is not in the expected format.(Microsoft Jet Database Engine).   
    This is a spreadsheet and there is no database, that is why I want to import it into a database!!  So the reference to JET is a tad disappointing.
    So why the error and how do I fix the problem?
    As there are over 100 variables in the spread sheet rows, it would be great to have this automatically create the database and populate the fields.
    I am using SQL 2014  Express and Office Excel 2013.
    Thank you in  advance for taking the time to read this, and hopefully sheading some light on the issue.

    Hi AWlcurrent,
    When import a .xlsx file to SQL Server using SQL Server Import and Export Wizard, you see a “External Table is not in the expected format.(Microsoft Jet Database Engine).” error message. This error message seems that the Microsoft JET Database Engine is
    unable to handle something that is contained in the file.
    So please make sure there is no unsupported content in the Excel file. Alternatively, we can use ‘Microsoft Excel’ as the Data Source, then Select ‘Microsoft Excel 2007’ as the Excel version to import the excel file.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Flex 4: Exporting DataGrid to Excel qs

    Howdy,
    I already read the "Feature Specs" for Flex 4.
    And I don't think there's any feature that's going to export DG to Excel but I might be wrong.
    But I would like to hear someone from Adobe to confirm it before I try using as3xls library.
    Appreciate the help.
    Thank you.

    You will be able to do that in AIR2, see this example from Christophe Coenraets:
    http://coenraets.org/blog/2009/11/open-in-excel-another-air-2-mini-sample/
    Cheers,
    Oleg.

  • I'm using LR 4.4.  How do I extract the metadata from my images and export it into Excel?

    I want to extract the metadata I have added to my images and export it into an Excel spreadsheet.  Can this be done within LR4.4?  If the software doesn't have a function for this is there another way to do it?
    Thanks for any help you can offer.

    JB's ListView is the most straight-forward solution, but
    ConfidentialInformant
    allows for full customization (e.g. if you want to pick and choose custom metadata fields, or export more fields than ListView supports (10), or tweak data formats, or add intelligence...).
    Rob

  • NaN and Export Issue in Excel

    Hi
    I have an Issue that I need to calculate value on below condition 
    ((ReportItems!txtPayaClick.Value/ReportItems!txtPayExpLH.Value)-1)*100.
    But Above give me errorthat is showing  "NaN" as an Result.
    Then I used;=IIF(ReportItems!txtPayExpLH.Value=0,0,((ReportItems!txtPayaClick.Value/ReportItems!txtPayExpLH.Value)-1)*100)
    This Time when I Export the report in excel Format It gives me same error (NaN) .
    Kindly help me .
    Thanks

    Hello,
    The issue is due to the IIF function always evaluates both the true part and the false part, even though it returns only one of them. This means both the true part and the false part need to be evaluated.
    In order to resolve the issue, please refer to the following expression:
    =IIF(ReportItems!txtPayExpLH.Value=0,0,
    ((ReportItems!txtPayaClick.Value/IIF(ReportItems!txtPayExpLH.Value=0,1, ReportItems!txtPayExpLH.Value))-1)*100)
    Alternatively, we can use following custom code to work around the issue:
    Public Function Divider (ByVal Dividend As Double, ByVal Divisor As Double)
    If IsNothing(Divisor) Or Divisor = 0
    Return 0
    Else
    Return Dividend/Divisor
    End If
    End Function
    Then, use following expression:
    =Code.Divider(ReportItems!txtPayaClick.Value, ReportItems!txtPayExpLH.Value)
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Insert an image in header and export to PDF/Excel WAD

    Hi experts!
    I'm trying to create a Web template for one of my queries with the WAD.
    I've added a table at the top, containing a logo and One custom text. Below that table, I've added a CONTAINER_LAYOUT_ITEM, and in this element, I've added different item, like BUTTON_GROUP_ITEM, INFO_FIELD_ITEM, NAVIGATION_PANE_ITEM and ANALISYS_ITEM, related with one query.
    One of the buttons I've created one with the action EXPORT but in the Data Binding secction, only the items (BUTTON_GROUP_ITEM, INFO_FIELD_ITEM, NAVIGATION_PANE_ITEM and ANALISYS_ITEM) are shown. So I can't select the table I've created for the export.
    I've tried to put the table in one CONTAINER_ITEM, and the select it in the export command, but it doesn't work.
    Does anybody any idea about how to inlcude the logo and the Title in the PDF or Excel export??
    Thanks in advance for your help
    Best regards,

    When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    I'm confused, you are returning a GIF, not a PDF in the code below, but you are telling the client you are returning a JPEG.
    Graphics2D.drawImage
    ImageIO.read

  • How to run SQL and export results to Excel

    My task is to run a custom SQL script and create Excel file via running SQL Developer from command line (invoked by a scheduled script). Is this possible using SQL Developer?
    The thing I'm trying first is to run a user-defined report in SQL Developer and save the results to an Excel file. Only 16000 result rows, but took 10 minutes to do the export and still cannot finish. Is there another way to do it?
    Many thanks.

    Thanks K for the update.
    I have done csv files before using pl/sql, no problem at all. It's just that in current work environment, we're using a 3rd party tool to make the Excels and I was asked to study the feasibility of using SQL Developer instead of our current commercial tool to do the job.

  • Creating an 3D array and exporting it to excel

    I'm trying to create a spreadsheet file that will have three columns of data. So far, I've been only successful in getting two columns. I tried to look for examples but I could only find examples that had single-floating point numbers, not strings.
    I've been sucessful in writing strings to an Excel worksheet, now I just need to find a way to take every other data point in the second column and give it it's own column.
    To aid in solving the problem, I've attached the excel file that the VI wrote to as well as the VI itself.
    Attachments:
    temp ‏1 KB
    DAC_and_53131_Analysis3.vi ‏92 KB

    UPDATE: I have found another problem with my code. Seems like that the frequency string I'm writing is sorted by a column while the 1/2 voltage increments are in a row. I'm trying to fix it so that the frequencies would be in a row of their own. Any input would be greatly appreciated.
    Attached is a sample output file of the problem.
    Attachments:
    Frequency_Problem.txt ‏1 KB

  • Export DataGrid to Excel. (Need Help @_@)

    Hi Guys..
         im newbie flex developer, i just want to ask how im going to export may data to excel??

    http://code.google.com/p/as3xls/

  • Reporting and exporting to Excel in SharePoint Online

    Hi
    I've developed a SharePoint site to replace a legacy Access database that dealt with consumer complaints and queries. In the Access database I'd developed a feature that allowed users to filter the complaints by a number of criteria and export them to Excel
    and I'm trying to do the same in SharePoint.
    If it were on-premises SharePoint I'd just create a parameterised SSRS report which would solve all my problems. However being SharePoint online, this is not an option. I'd like the users to be able to select complaints from any date range, for any category
    of complaint and for any product supplier (plus a few other criteria). The idea is that they want to be able to then send the filtered data to individual suppliers. Doing this out of the box with views throws up several problems. The main one is that any export
    to Excel of a view exports the entire set of data, meaning that users themselves would need to create a new view for every export they wished to perform, which is not practical.
    My question is: what is the best way in SharePoint online to export a filtered subset of a list to Excel?
    I can use SharePoint designer, but not C# in order to achieve the goal. We also have SharePoint Online Plan 2 if that makes it easier.
    Thanks in advance,
    Duncan

    Hi Duncan,
    Well its easy to Reporting and exporting to Excel in SharePoint Online,
    See the Youtube link below and other links for more descriptions.
    Office 365: Synchronize Excel with SharePoint Online
    Reporting and exporting to Excel in SharePoint Online
    Thanks
    Indul Hassan (www.indulhassan.com)

Maybe you are looking for

  • Looking for duplicated words

    please help me to do this problem to read a sequence of strings looking for duplicated words. The program should find places in the input where one word is followed immediately by itself . keep track of the largest number of times a single repetation

  • Carriage returns on  external tbl

    version 11g Just looking for some help. Built an external table from a csv file. One of the columns in the csv has fields that have data like so : From Submitter: Testing the tools was working well. Please see below comments. Tom Stevens (JRP Design)

  • Why am i not able to run this program ??

    When i exec a single process it works fine but when i try to execute array of commands i couldn't it complies but doesn't execute any 1 of the commands. Please let me know import java.io.IOException; class RunTime public static void main(String raja[

  • Why can't I get iOS 7 for iPod 4?

    Why can I get it. Apple just released iOS 6.1.5 BUT NOT 7.0 or whatever that is out there

  • Netbeans error during Sun Studio 12 install

    I am trying to install Sun Studio 12 on a SunFire X4140 running Solaris 10 5/08. When I run the ./prepare_system -s netbeans command, I get the following error, "Preparation failed at step netbeans." The Sun Studio 12 [Release Notes|http://docs.sun.c