Export to Excel (as a REAL excel file)

I've been exporting data to excel for ages now, so I know the
drill - build the data as an HTML table or MSOFFICE XML,set the
<cfcontent type="application/vnd.ms-excel"> and then output
the result. At the moment, I am trying to generate an excel file to
import into another application (Microsoft MapPoint, to be exact).
The problem seems to be that MapPoint won't recognize the
generated file as being an excel file. My guess is its because the
file is not an excel file, per se, but a format that excel
recognizes and can convert into a spreadsheet. If I load the
CF-generated file into excel and then save as a new file, then the
new file imports just fine into MapPoint. So my question is this:
Does anyone know of a way to export data from ColdFusion as a
real XLS file? I have some experience working with Jakarta POI, so
I'm thinking that's where this fun little journey is going to wind
up. But I thought I'd send it out there and see if anyone in the
community has any better suggestions.
thanks a lot, all!

quote:
Originally posted by:
insuractive
It would go something like this:
<cfscript>
// Create Color object (to reference static properties)
objColor = CreateObject("Java",
"org.apache.poi.hssf.util.HSSFColor");
// assuming wb workbook object has already been created
objStyle = wb.createCellStyle();
objStyle.setFillBackgroundColor(objColor.AQUA.index);
objStyle.setFillPattern(objStyle.BIG_SPOTS);
// assuming row object has already been created
objCell= row.createCell(JavaCast("int",1));
objCell.setCellValue("X");
objCell.setCellStyle(objStyle);
</cfscript>
The colors AQUA and ORANGE are special cases. If you check
the API, you'll see they are inner (or nested) classes.
http://poi.apache.org/apidocs/org/apache/poi/hssf/util/HSSFColor.html
So you cannot just instantiate the outer class and refer to
them as objColor.AQUA and objColor.ORANGE. You need a special
syntax to create an instance of the nested class. Though
technically I suppose its not truly instantiated but that's another
question :)
Instead of ...
<cfscript>
objColor = CreateObject("Java",
"org.apache.poi.hssf.util.HSSFColor");
// assuming wb workbook object has already been created
objStyle = wb.createCellStyle();
objStyle.setFillBackgroundColor(objColor.AQUA.index);
</cfscript>
You'll need to use:
<cfscript>
aqua = CreateObject("Java",
"org.apache.poi.hssf.util.HSSFColor$AQUA");
objStyle = wb.createCellStyle();
objStyle.setFillBackgroundColor(aqua.index);
</cfscript>
... OR
<cfscript>
aquaIndex = CreateObject("Java",
"org.apache.poi.hssf.util.HSSFColor$AQUA").index;
objStyle = wb.createCellStyle();
objStyle.setFillBackgroundColor(aquaIndex);
</cfscript>

Similar Messages

  • How to format the font in Cell when export to Excel file?

    Dear all,
    I am using the CRJ SDK 12 to export to Excel file, but i i want to format the font of Cells in Excel when exporting them.
    Can you help me to solve this issue?
    Thanks,
    Nha

    There's no control over per-cell formatting for Excel exports.
    Sincerely,
    Ted Ueda

  • Bitmap is not exporting to excel file

    Any kind help appreciated.
    I have added a bitmap image in my workbook but when i am exporting it into excel or html ,only text part of the title is exporting into excel file .
    The bitmap is only visible in discoverer workbook ,after exporting to excel or html, it disappears,
    i am using oracle 9i discoverer version 9.0.2.0
    thanks,

    Hi,
    Bitmaps in the workbook titles are not exported. I guess it was just too difficult to do when they added bitmaps into the titles.
    Rod West

  • After Export to Excel File error while opening using xmlwriter in silverlight

    Can one help me in fixing following issue after to export to excel had done iam getting following error message 
    "The file you are trying to open, 'test.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do uou want to open the file now ?"
    If i click Yes file opens correctly but it shows above message . Can any one suggest me how to avoid this programatically with the following code.
    I tried by changing the file saving as  .xls to .xlsx  but it doesnt works.
    Public Sub Export()
    Dim ss As String = "urn:schemas-microsoft-com:office:spreadsheet"
    Dim DataType As String
    Dim DataValue As Object
    'Dim DataView As C1.Silverlight.Data.DataView = m_DataGrid.ItemsSource
    'Dim ItemsSource As C1.Silverlight.Data.DataTable = DataView.Table
    Dim XmlSettings As XmlWriterSettings
    Dim ColumnBinding As Binding
    Dim FieldName As String
    Dim DataGridColumn As C1.Silverlight.DataGrid.DataGridColumn
    Dim ColumnIndex As Integer
    Dim J As Integer
    Dim DataGridRow As C1.Silverlight.DataGrid.DataGridRow
    Dim CommonUtil As New GoldCRM.Core.Common.Util
    Dim PropertyInfo As System.Reflection.PropertyInfo
    Dim CellFormat As String
    Try
    If m_DataGrid.Rows.Count = 0 Then Exit Try
    XmlSettings = New XmlWriterSettings
    XmlSettings.Indent = True
    XmlSettings.NewLineOnAttributes = False
    Using myXML As XmlWriter = XmlWriter.Create(m_Stream, XmlSettings)
    With myXML
    .WriteStartDocument()
    .WriteProcessingInstruction("mso-application", "progid=" & ControlChars.Quote & "Excel.Sheet" & ControlChars.Quote)
    .WriteStartElement("Workbook", ss)
    .WriteStartElement("DocumentProperties", "urn:schemas-microsoft-com:office:office")
    .WriteElementString("Author", m_DocumentProperties.Author)
    .WriteElementString("LastAuthor", String.Format("{0} {1}", Application.Current.Resources("EmpFirstName"), Application.Current.Resources("EmpLastName")))
    .WriteElementString("Created", m_DocumentProperties.Created)
    .WriteElementString("LastSaved", m_DocumentProperties.LastSaved)
    .WriteElementString("Company", Application.Current.Resources("REPORTINGSITENAME"))
    .WriteElementString("Version", m_DocumentProperties.Version)
    .WriteEndElement() 'Document Properties
    .WriteStartElement("ExcelWorkbook", "urn:schemas-microsoft-com:office:excel")
    .WriteElementString("WindowHeight", m_WorkbookProperties.WindowHeight)
    .WriteElementString("WindowWidth", m_WorkbookProperties.WindowWidth)
    .WriteElementString("WindowTopX", m_WorkbookProperties.WindowTopX)
    .WriteElementString("WindowTopY", m_WorkbookProperties.WindowTopY)
    .WriteElementString("ProtectStructure", m_WorkbookProperties.ProtectStructure)
    .WriteElementString("ProtectWindows", m_WorkbookProperties.ProtectWindows)
    .WriteEndElement() 'Excel Workbook
    .WriteStartElement("Styles")
    For I As Integer = 0 To m_Styles.Count - 1
    .WriteStartElement("Style")
    .WriteAttributeString("ss", "ID", ss, m_Styles(I).ID)
    If m_Styles(I).Name <> "" Then
    .WriteAttributeString("ss", "Name", ss, m_Styles(I).Name)
    End If
    'ALIGNMENT LOGIC:
    .WriteStartElement("Alignment")
    If Not m_Styles(I).Alignment Is Nothing Then
    If m_Styles(I).Alignment.Horizontal <> 0 Then
    .WriteAttributeString("ss", "Horizontal", ss, m_Styles(I).Alignment.Horizontal.ToString)
    End If
    If m_Styles(I).Alignment.Vertical <> 0 Then
    .WriteAttributeString("ss", "Vertical", ss, m_Styles(I).Alignment.Vertical.ToString)
    End If
    If m_Styles(I).Alignment.WrapText = True Then
    .WriteAttributeString("ss", "WrapText", ss, "1")
    End If
    End If
    .WriteEndElement()
    'BORDER LOGIC:
    .WriteStartElement("Borders")
    .WriteStartElement("Border")
    .WriteAttributeString("ss", "Position", ss, "Bottom")
    .WriteAttributeString("ss", "LineStyle", ss, "Continuous")
    .WriteAttributeString("ss", "Weight", ss, "1")
    .WriteEndElement() 'Border
    .WriteStartElement("Border")
    .WriteAttributeString("ss", "Position", ss, "Left")
    .WriteAttributeString("ss", "LineStyle", ss, "Continuous")
    .WriteAttributeString("ss", "Weight", ss, "1")
    .WriteEndElement() 'Border
    .WriteStartElement("Border")
    .WriteAttributeString("ss", "Position", ss, "Right")
    .WriteAttributeString("ss", "LineStyle", ss, "Continuous")
    .WriteAttributeString("ss", "Weight", ss, "1")
    .WriteEndElement() 'Border
    .WriteStartElement("Border")
    .WriteAttributeString("ss", "Position", ss, "Top")
    .WriteAttributeString("ss", "LineStyle", ss, "Continuous")
    .WriteAttributeString("ss", "Weight", ss, "1")
    .WriteEndElement() 'Border
    .WriteEndElement() 'Borders
    'FONT LOGIC:
    .WriteStartElement("Font")
    Dim myFont As Excel.Styles.Font = m_Styles(I).Font
    .WriteAttributeString("ss", "FontName", ss, myFont.FontName.ToString)
    .WriteAttributeString("ss", "Size", ss, myFont.Size)
    .WriteAttributeString("ss", "Color", ss, myFont.Color.ToString.Remove(1, 2))
    If myFont.Bold = True Then .WriteAttributeString("ss", "Bold", ss, "1")
    If myFont.Italic = True Then .WriteAttributeString("ss", "Italic", ss, "1")
    If myFont.Underline <> 0 Then .WriteAttributeString("ss", "Underline", ss, myFont.Underline.ToString)
    .WriteEndElement()
    Dim myInterior As Excel.Styles.Interior = m_Styles(I).Interior
    .WriteStartElement("Interior")
    .WriteAttributeString("ss", "Color", ss, myInterior.Color.ToString.Remove(1, 2))
    .WriteAttributeString("ss", "Pattern", ss, "Solid")
    .WriteEndElement()
    .WriteStartElement("NumberFormat")
    .WriteEndElement()
    .WriteStartElement("Protection")
    .WriteEndElement()
    .WriteEndElement() 'Style
    Next I
    .WriteStartElement("Style")
    .WriteAttributeString("ss", "ID", ss, "DateStyle")
    .WriteStartElement("NumberFormat")
    .WriteAttributeString("ss", "Format", ss, "General Date")
    .WriteEndElement() 'NumberFormat
    .WriteEndElement() 'Style
    .WriteStartElement("Style")
    .WriteAttributeString("ss", "ID", ss, "HeaderStyle")
    .WriteStartElement("Font")
    .WriteAttributeString("x", "Family", ss, "Swiss")
    .WriteAttributeString("ss", "Bold", ss, "1")
    .WriteEndElement() 'Font
    .WriteEndElement() 'Style
    .WriteEndElement() 'Styles
    'WORKSHEETS:
    .WriteStartElement("Worksheet")
    .WriteAttributeString("ss", "Name", ss, "WORKSHEET")
    .WriteStartElement("Table")
    .WriteAttributeString("ss", "ExpandedColumnCount", ss, m_DataGrid.Columns.Count)
    .WriteAttributeString("ss", "ExpandedRowCount", ss, m_DataGrid.Rows.Count + 100) 'Temporary fix: sometimes 1 row is not added.
    .WriteAttributeString("ss", "FullColumns", ss, m_DataGrid.Columns.Count)
    .WriteAttributeString("ss", "FullRows", ss, m_DataGrid.Rows.Count + 100) 'Temporary fix: sometimes 1 row is not added.
    .WriteAttributeString("ss", "DefaultRowHeight", ss, 15)
    For Each DataGridColumn In m_DataGrid.Columns
    If DataGridColumn.Visibility = Visibility.Visible Then
    .WriteStartElement("Column")
    If TypeOf DataGridColumn Is C1.Silverlight.DataGrid.DataGridNumericColumn Then
    .WriteAttributeString("ss", "AutoFitWidth", ss, 1)
    ElseIf TypeOf DataGridColumn Is C1.Silverlight.DataGrid.DataGridDateTimeColumn Then
    .WriteAttributeString("ss", "AutoFitWidth", ss, 1)
    Else
    .WriteAttributeString("ss", "AutoFitWidth", ss, 0)
    End If
    If DataGridColumn.Width.Value <= 100 Then
    .WriteAttributeString("ss", "Width", ss, 100)
    Else
    .WriteAttributeString("ss", "Width", ss, DataGridColumn.Width.Value)
    End If
    .WriteEndElement()
    End If
    Next
    J = 0
    For Each DataGridRow In m_DataGrid.Rows
    J += 1
    If TypeOf DataGridRow Is GoldCRM.Controls.Filter.clsFilterRow Then
    .WriteStartElement("Row")
    .WriteAttributeString("ss", "Index", ss, J)
    .WriteAttributeString("ss", "AutoFitHeight", ss, 0)
    .WriteAttributeString("ss", "Height", ss, 15)
    ColumnIndex = 0
    For Each DataGridColumn In m_DataGrid.Columns
    If DataGridColumn.Visibility = Visibility.Visible Then
    FieldName = String.Empty
    If TypeOf DataGridColumn Is DataGridBoundColumn Then
    ColumnBinding = TryCast(DataGridColumn, DataGridBoundColumn).Binding
    If ColumnBinding.Path IsNot Nothing Then
    FieldName = ColumnBinding.Path.Path
    End If
    ElseIf TypeOf DataGridColumn Is DataGridTemplateColumn Then
    If DataGridColumn.FilterMemberPath IsNot Nothing Then
    FieldName = DataGridColumn.FilterMemberPath.Trim
    End If
    End If
    If Not FieldName.Equals(String.Empty) Then
    ColumnIndex += 1
    .WriteStartElement("Cell")
    .WriteAttributeString("ss", "Index", ss, ColumnIndex)
    .WriteAttributeString("ss", "MergeAcross", ss, 0)
    .WriteAttributeString("ss", "StyleID", ss, "HeaderStyle")
    .WriteStartElement("Data")
    .WriteAttributeString("ss", "Type", ss, "String")
    If DataGridColumn.Header IsNot Nothing Then
    .WriteValue(DataGridColumn.Header.ToString)
    Else
    .WriteValue("")
    End If
    .WriteEndElement() 'Data
    .WriteEndElement() 'Cell
    End If
    End If
    Next
    .WriteEndElement() 'Row
    End If
    If Not (TypeOf DataGridRow Is GoldCRM.Controls.Filter.clsFilterRow) Then
    .WriteStartElement("Row")
    .WriteAttributeString("ss", "Index", ss, J + 1)
    .WriteAttributeString("ss", "AutoFitHeight", ss, 0)
    .WriteAttributeString("ss", "Height", ss, 15)
    ColumnIndex = 0
    For Each DataGridColumn In m_DataGrid.Columns
    If DataGridColumn.Visibility = Visibility.Visible Then
    FieldName = String.Empty
    If TypeOf DataGridColumn Is DataGridBoundColumn Then
    ColumnBinding = TryCast(DataGridColumn, DataGridBoundColumn).Binding
    If ColumnBinding.Path IsNot Nothing Then
    FieldName = ColumnBinding.Path.Path
    End If
    ElseIf TypeOf DataGridColumn Is DataGridTemplateColumn Then
    If DataGridColumn.FilterMemberPath IsNot Nothing Then
    FieldName = DataGridColumn.FilterMemberPath.Trim
    End If
    End If
    If Not FieldName.Equals(String.Empty) Then
    ColumnIndex += 1
    Dim DataCellValue As Object = Nothing
    If Not (TypeOf DataGridRow Is GoldCRM.Controls.Filter.clsFilterRow) Then
    PropertyInfo = CommonUtil.GetProperty(DataGridRow.DataItem, FieldName)
    If PropertyInfo IsNot Nothing Then
    DataCellValue = PropertyInfo.GetValue(DataGridRow.DataItem, Nothing)
    End If
    End If
    CellFormat = String.Empty
    If DataCellValue IsNot Nothing Then
    Select Case DataCellValue.GetType.Name.ToUpper
    Case "BitmapImage".ToUpper
    DataValue = "Image"
    DataType = "String"
    Case "Hyperlink".ToUpper
    DataType = "String"
    DataValue = "Hyperlink"
    Case "Decimal".ToUpper
    DataType = "Number"
    DataValue = DataCellValue
    Case "DateTime".ToUpper
    If CType(DataCellValue, Date).Year > 1900 Then
    DataType = "DateTime"
    DataValue = DataCellValue
    CellFormat = "DateStyle"
    Else
    DataType = "String"
    DataValue = DataCellValue
    End If
    Case Else
    DataType = "String"
    DataValue = DataCellValue
    End Select
    Else
    DataType = "String"
    DataValue = String.Empty
    End If
    .WriteStartElement("Cell")
    .WriteAttributeString("ss", "Index", ss, ColumnIndex)
    .WriteAttributeString("ss", "MergeAcross", ss, 0)
    If Not CellFormat.Equals(String.Empty) Then
    .WriteAttributeString("ss", "StyleID", ss, CellFormat)
    End If
    .WriteStartElement("Data")
    .WriteAttributeString("ss", "Type", ss, DataType)
    .WriteValue(DataValue)
    .WriteEndElement() 'Data
    .WriteEndElement() 'Cell
    End If
    End If
    Next
    .WriteEndElement() 'Row
    End If
    Next
    .WriteEndElement() 'Table
    .WriteEndElement() 'Worksheet
    .WriteEndElement() 'Workbook
    .WriteEndDocument()
    .Close()
    End With
    End Using
    Catch ex As Exception
    Throw New Exception(ex.Message, ex)
    Finally
    If m_Stream IsNot Nothing Then
    m_Stream.Close()
    m_Stream.Dispose()
    End If
    m_Stream = Nothing
    m_DataGrid.IsLoading = False
    DataValue = Nothing
    'DataView = Nothing
    'ItemsSource = Nothing
    XmlSettings = Nothing
    ColumnBinding = Nothing
    DataGridColumn = Nothing
    End Try
    End Sub
    Krishna

    Hi,
    i have the same issue now where i need to populate the xport file name as report name. can you send me your solution please.

  • Can i export an excel file to my I-Cal & if so how?

    Hi.  I have a large amount of data/dates in an excel file and I would like to easily export these into my I-Cal. Please advise.

    But if it's a big album, be sure to create a new folder on the desktop first, to export them into. Having hundreds of individual photos on your desktop will slow your computer to a crawl.

  • Export to Excel - File Name WAD 7.0

    Hi All,
    I am using Export to Excel Functionality with WAD 7.0 to export the report to excel format.
    I have used button web item, with an excel picture above it. The functionality works fine.
    But while exporting the name of excel file shown is WAD 7.0 name.
    ex. My WAD 7.0 name is IFIOP_C07_W700, the excel file also gets saved in this name.
    I want it to be made customizable.
    Can you throw some pointers.
    Thanks,
    Sri Arun Prian

    Hi,
    i have the same issue now where i need to populate the xport file name as report name. can you send me your solution please.

  • Room Data not getting exported to excel file

    Hello,
    I am facing a small issue regarding collaboration rooms.
    I created some Rooms and Created few Tasks in each room. I tried to export the task details in a excel file. For most of the rooms it is working fine but for few rooms either data is not getting exported or some data is missing in the generated excel file.I am working on EP 7.0  and all the rooms are created from the same user.
    What could be the possible reason for such a behaviour ?  Kindly Help me with this.

    i believe you can use GUI_DOWNLOAD simply for this purpose.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = 'c:\abc.xls'
       FILETYPE                        = 'ASC'
       WRITE_FIELD_SEPARATOR           = 'X'
    TABLES
        DATA_TAB                        = ITAB
    it will work, i believe.
    regards
    srikanth

  • Another question about import/export to excel file?

    Hi, I need to know urgently if it's possible to import/export excel files from/to JSP with unpredicted number of fields each row. For example, row 1 in the excel file can have 5 columns of data, row 2 has 3 columns of data, etc...
    Does reading from excel file in JSP require that we know beforehand how many columns there are and what each column represent?

    go read http://jakarta.apache.org/poi !!!!!!
    No it doesnt. the POI api provide method to determine the number of cells in a row.

  • How can I take the photo by capture the photo, plot the graph(control chart) in the same times and export to Excel File

    I want to do my sample of the project  following these steps.

     1. Create the template for compare other objects.
     2. Save the template and ready for compare realtime with other objects  
    II 
    1. Use the CCTV video camera Sony capture the picture of the object (lego toys).
    2. Calculate the size of the objects and change to mm.
    3. Compare with the template and plot graph(Control chart) by length
    4.  Export the data to Excel Files
    Solved!
    Go to Solution.

    Nice project !
    I sincerely hope you are not expecting us to do your homework.
    What is your experience with LabVIEW ? 
    May be you should try to start to code something and then come back later with some more specific question ?
    Message Edité par chilly charly le 01-02-2009 08:40 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Export to excel file problem

    When I export my Crystal report to excel file (97-2000)
    it does not show the Boxes and lines in excel file.
    I am using CR 11 and MS Office 2003
    please guide me how to solve this problem
    Edited by: mian ghous on Feb 10, 2009 1:59 PM

    But, DUDE, it IS possible using borders!  Each of the border options has a formula field that you can code to tell Crystal in effect "on this line of the report, I want xxx borders". 
    Let's start with the easiest example:  Say you want the line to go around the column heading (full box). then lines down each side of the column until the end, then for the the subtotal you want lines on three sides (all but top).  Set all four borders for the heading field to Single, set the right and left borders for the data field to Single, and set all but the top border for the subtotal field to Single.
    To expand this, let's say there is no subtotal, and you want the last value in the field to have a bottom border.  Set the header and data field borders as above, except for the bottom border of the data field, use the following formula (basic syntax):
    if {field} = NextValue({field}) then
      formula = crNoLine
    else
      formula = crSingleLine
    end if
    If you want the line across the top of the data field on the first detail row (i.e., not around the header), use the same logic as above, except using PreviousValue().
    HTH,
    Carl
    Edited by: Carl Sopchak on Feb 11, 2009 8:25 AM

  • Exporting large excel file exception

    Hello-
    I am using Jasper reports within a j2ee application to generate an excel file, and this file is written on the reponse outputstream. It is deployed as a web application on Oracle application server 10g
    When the generated xls file is large like 2 Mb or more, Oracle application server throws ServletException and sometimes NullpointerException.
    The same application runs smoothly on the IBM Webshpere test server embedded on websphere application developer.
    I tried to increase the reponse buffer size for AS10g but the problem is still there.
    Could anyone help in this?
    Thanks

    Hi Jason,
    Unfortunately, Xcelsius is not designed to handle the large volume of embedded data that you have described.  There are basically 2 approaches to resolve your issue:
    1) Try to aggregate the data and simplify the lookups, to reduce the total number of cells until Xcelsius is able to process it;
    2) Store the large volume of data in an external data source and retrieve only the necessary subset of data via one of Xcelsius's external connectivity options including web services or XML etc.
    Also, with 15 tabs, depending on the number of components you have within each tab panel, you may also be pushing the limit of how many total components Xcelsius can handle.  However, based on your comments, I would say the real issue is the 8MB Excel file, a size which Xcelsius simply cannot handle.
    Regards,
    Mustafa.

  • Exporting to Excel file

    Hello experts,
    We're using BW 3.5 and from a Web Report based on a 0ADHOC template we download the report to an excel file.
    Is there a way to also export the values of the selection screen so the client has that information in the file? So far, only the navigation block and the rows and columns of the report are available in the file.
    Any help would be very much appreciated.
    Thanks in advance,
    Inma

    One trick that I have used before is that if the variables were checked as changeable during navigation, it would send them to the exported file.  This has other effects as for the way the variables work, but it did what we needed it to do. 
    Thanks,
    Jeff

  • Numbers locked up when I tried to export an excel file.

    When i tried to export a numbers file as an excel file, numbers froze and will not respond to anything I have tried.  My Mac willnot shut down until numbers responds.  What do i do to get numbers to respond?

    OS X: How to quit an unresponsive application using Force Quit

  • Crystal Report 2008 doesn't set  page size when export to excel file

    Hi,
    I am using Crystal Report 2008 Developer edition.
    At Crystal report design time setting the below page setup:
    Page Options -
       to A3(297X420 mm)
    Orientation --- Landscape
    and using the following code in .net (c#)
    I am using below format options to export in excel in .net 2005
    ReportDocument oReport = new ReportDocument();
    oReport.FormatEngine.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
    oReport.FormatEngine.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA3;
    if (aParamlist.ReportFormat == ReportFormatEnum.MicrosoftExcel)
    ExcelFormatOptions excel = new ExcelFormatOptions();
    excel.ExcelUseConstantColumnWidth = false;
    // Use detail section one as a guideline to determine column width
    excel.ExcelAreaGroupNumber = 1;
    //excel.ExcelAreaType = AreaSectionKind.Detail;
    excel.ExcelAreaType = AreaSectionKind.Detail;
    // Prepare exporting options
    ExportOptions export = oReport.ExportOptions;
    export.FormatOptions = excel;
    export.ExportFormatType = ExportFormatType.Excel;
    oReport.Export();
    when export to excel it doesn't set the Paper Size to  A3(297X420 mm).
    Is there any way to set the paper size while export to excel or in other formats also????
    Thanks & Regds,

    Hi,
    thanks for your email.
    This is not happening in development environment.It is setting the paper size anf paper orientation properly.
    this is happening in the production environment where only redist installation is done.
    thanks

  • Page headers are not exported to excel files - Is there a workaround?

    I use 2008, SP3.
    I am experiencing a problem with exporting to Excel(.xls): the page headers, but the very first, are not exported.
    The report page headers consist of weekdays and the corresponding dates, meanning they are different on each page.
    The report looks OK in pdf and doc formats.
    Is this a known problem or limitation?
    Is there is a way to controll the export to Excel to correct this problem?
    Thanks and ragards
    Israel M Brill, Analyst

    hi,
    Are you exporting from Crystal Report Designer or InfoView?
    If you are exporting from CR Designer, follow the below steps.
    - Click Export button
    - Microsoft Excel (97-2003) , OK
    - 'Excel Format Options' dialog box appears
    - Export Page Headers and Page Footers -> On Each Page, OK
    Regards,
    Vamsee

  • Page headers are not exported to excel files - can this be fixed in 2008SP3

    I use 2008, SP3.
    I am experiencing a problem with exporting to Excel(.xls): the page headers, but the very first, are not exported.
    The report page headers consist of weekdays and the corresponding dates, meanning they are different on each page.
    The report looks OK in pdf and doc formats.
    Is this a known problem or limitation?
    Is there is a way to controll the export to Excel to correct this problem?
    Thanks and ragards
    Israel M Brill, Analyst

    Note that this is the .NET - SAP Crystal Reports forum;
    Is this an issue in a .NET app?
    Does the report export as expected from the CR 2008 designer? If not, close this thread and post a new one in the [SAP Crystal Reports Design|SAP Crystal Reports, version for Visual Studio; forum.
    What version of .NET?
    Web or Win app?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Maybe you are looking for

  • How can I highlight pdf texts in adobe reader 9?

    I am using adobe reader 9 . How can I highlight pdf texts?

  • Extending Mic & Headphone connection to Front Panel Ja

    I have a SB Li've 5. (SB000) and I need to extend the "Mic In" Jack and "Line Out" Jack (for Headphones) connectors to the front panel jacks. Are the connector pins included in the "Audio Extension" (AUD_EXT) connector? If so, which are the pins? If

  • Hardware best suited (Windows) to run Photoshop?

    I am looking at upgrading my system to run Photoshop/Lightroom. I was looking at a AMD system with an FX-6300 processor (8 cores), 12gb of memory and the R9 255 graphics card w/ 2mb of dedicated memory. Will this system run those programs quickly and

  • Advice needed on where to install Bpel 10.1.3 (we use OracleAS 10.1.2)

    If I understand correctly, Bpel 10.1.3 cannot be installed on the middle tier of OracleAS 10.1.2. Unfortunately, we are not in a position to upgrade OracleAS at this point in time, but we want to use Bpel 10.1.3. I understand that Bpel portlets can b

  • Oracle 9.2 and RH 7.3

    Hello! I'm trying to install 9R2 to RH 7.3. I have following error during linking: Error in invoking target install of makefile ..../plsql/lib/ins_plsql.mk When I try to run it manually I get following: /u01/OraHome1/bin/genclntsh /u01/OraHome1/lib/l