Format an excel

Hi,
My requirement is to format an excel sheet.
I have the excel already on my system and now i need to adjust the column sizes and make the first line in the excel to bold characters.
This the code that i have written
****declarations
  INCLUDE ole2incl.
  DATA: excel           TYPE ole2_object.
  DATA: w_books         TYPE ole2_object.
  DATA: w_book          TYPE ole2_object.
  DATA: l_fileformat    TYPE localfile.
  DATA: column          TYPE ole2_object.
code***
  l_fileformat = l_ftemp.
  CREATE OBJECT excel 'EXCEL.APPLICATION'.
  SET PROPERTY OF excel 'VISIBLE' = 1.
Open the file
  CALL METHOD OF excel 'WORKBOOKS' = w_books.
  CALL METHOD OF w_books 'OPEN' = w_book
    EXPORTING
    #1 = l_fileformat.  
  CALL METHOD OF w_books 'Columns' = column EXPORTING #1 = 1.
  CALL METHOD OF column 'Autofit'.
  CALL METHOD OF w_book 'SAVE'.
  CALL METHOD OF w_book 'close'.
  CALL METHOD OF excel 'Quit'.
  FREE excel.
This code does not adjust the cloumn width. It opens up on the desktop and does not close. Can anyone help me on this?
Its very urgent.
Thanks,
raksha

Hi,
Copy and paste the below program, you understnad everything
*& Report ZETA_EXCEL_DOWNLOAD_CLIPBOARD *
report zeta_excel_download_clipboard .
include ole2incl.
data: w_cell1 type ole2_object,
w_cell2 type ole2_object.
*--- Ole data Declarations
data: h_excel type ole2_object, " Excel object
h_mapl type ole2_object, " list of workbooks
h_map type ole2_object, " workbook
h_zl type ole2_object, " cell
h_f type ole2_object, " font
gs_interior type ole2_object, " Pattern
worksheet type ole2_object,
h_cell type ole2_object,
h_cell1 type ole2_object,
range type ole2_object,
h_sheet2 type ole2_object,
h_sheet3 type ole2_object,
gs_font type ole2_object,
flg_stop(1) type c.
** Internal table Declaration
data: begin of t_excel occurs 0,
vkorg(20) type c, "Sales Org
vbtyp(20) type c, "Document Category
auart(20) type c, "Document Type
ernam(20) type c, "Created By
vbeln(20) type c, "Document Number
posnr(20) type c, "Item Number
erdat(20) type c, "Created Date
vdatu(20) type c, "Header Requested Delivery Date
reqdat(20) type c, "Request date
condat(20) type c, "Confirm date
lifsk(20) type c, "Header Block
txt30(30) type c, "Order User Status Description
lifsp(20) type c, "Line Block
dispo(20) type c, "MRP Controller
dsnam(20) type c, "MRP Controller Description
vmsta(20) type c, "Material Sales Status
kunnr(20) type c, "Sold To
cname(35) type c, "Sold To Name
regio(20) type c, "State
cufd(10) type c, "CUD
bstnk(20) type c, "PO#
bsark(20) type c, "Ordering Method
matnr(20) type c, "Material
maktx(35) type c, "Material Description
t200(20) type c, "T200
vtext(20) type c, "T200 Description
matkl(20) type c, "Material Group
zzbomind(7) type c, "BOM Indicator
ostat(20) type c, "Order Status
cmgst(20) type c, "CRD
inco1(20) type c, "Incoterms
oqty(20) type c, "Order Quantity
pqty(20) type c, "Open Quantity
unit(20) type c, "UOM
onet(20) type c, "Order Value
pnet(20) type c, "Open Value
curr(20) type c, "Currency key
so_bezei like tvkbt-bezei,"Sales Office
sg_bezei like tvgrt-bezei,"Sales Group
bname(20) type c, "Ordering Party
contact(20) type c, "Contact Name
telf1(20) type c, "Contact telf1
reqqty(20) type c, "Item Request qty
reqval(20) type c, "Item Request value
conqty(20) type c, "Item Confirm qty
conval(20) type c, "Item Confirm value
zzrev(02) type c, "Revenue recognition acceptance
bezei(20) type c, "Revenue recognition text
vgbel(20) type c, "Reference Order for RETURNS
0008text(255) type c, "Internal Order Comment Text
end of t_excel.
data: t_excel_bckord like t_excel occurs 0 with header line,
t_excel_bcklog like t_excel occurs 0 with header line,
t_excel_blkord like t_excel occurs 0 with header line.
types: data1(1500) type c,
ty type table of data1.
data: it type ty with header line,
it_2 type ty with header line,
it_3 type ty with header line,
rec type sy-tfill,
deli(1) type c,
l_amt(18) type c.
data: begin of hex,
tab type x,
end of hex.
field-symbols: <fs> .
constants cns_09(2) type n value 09.
assign deli to <fs> type 'X'.
hex-tab = cns_09.
<fs> = hex-tab.
data gv_sheet_name(20) type c .
* M A C R O Declaration
define ole_check_error.
if &1 ne 0.
message e001(zz) with &1.
exit.
endif.
end-of-definition.
t_excel_bckord-vkorg = 'ABC'.
t_excel_bckord-vbtyp = 'DEF'.
t_excel_bckord-auart = 'GHI'.
t_excel_bckord-ernam = 'JKL'.
t_excel_bckord-vbeln = 'MNO'.
t_excel_bckord-0008text = 'XYZ'.
append t_excel_bckord.
t_excel_bckord-vkorg = 'ABC1'.
t_excel_bckord-vbtyp = 'DEF1'.
t_excel_bckord-auart = 'GHI1'.
t_excel_bckord-ernam = 'JKL1'.
t_excel_bckord-vbeln = 'MNO1'.
t_excel_bckord-0008text = 'XYZ1'.
append t_excel_bckord.
t_excel_bckord-vkorg = 'ABC2'.
t_excel_bckord-vbtyp = 'DEF2'.
t_excel_bckord-auart = 'GHI2'.
t_excel_bckord-ernam = 'JKL2'.
t_excel_bckord-vbeln = 'MNO2'.
t_excel_bckord-0008text = 'XYZ2'.
append t_excel_bckord.
t_excel_bcklog-vkorg = 'ABC'.
t_excel_bcklog-vbtyp = 'DEF'.
t_excel_bcklog-auart = 'GHI'.
t_excel_bcklog-ernam = 'JKL'.
t_excel_bcklog-vbeln = 'MNO'.
t_excel_bcklog-0008text = 'XYZ'.
append t_excel_bcklog.
t_excel_bcklog-vkorg = 'ABC1'.
t_excel_bcklog-vbtyp = 'DEF1'.
t_excel_bcklog-auart = 'GHI1'.
t_excel_bcklog-ernam = 'JKL1'.
t_excel_bcklog-vbeln = 'MNO1'.
t_excel_bcklog-0008text = 'XYZ1'.
append t_excel_bcklog.
t_excel_bcklog-vkorg = 'ABC2'.
t_excel_bcklog-vbtyp = 'DEF2'.
t_excel_bcklog-auart = 'GHI2'.
t_excel_bcklog-ernam = 'JKL2'.
t_excel_bcklog-vbeln = 'MNO2'.
t_excel_bcklog-0008text = 'XYZ2'.
append t_excel_bcklog.
t_excel_bcklog-vkorg = 'ABC3'.
t_excel_bcklog-vbtyp = 'DEF3'..
t_excel_bcklog-auart = 'GHI3'.
t_excel_bcklog-ernam = 'JKL3'.
t_excel_bcklog-vbeln = 'MNO3'.
t_excel_bcklog-0008text = 'XYZ3'.
append t_excel_bcklog.
t_excel_blkord-vkorg = 'ABC'.
t_excel_blkord-vbtyp = 'DEF'.
t_excel_blkord-auart = 'GHI'.
t_excel_blkord-ernam = 'JKL'.
t_excel_blkord-vbeln = 'MNO'.
t_excel_blkord-0008text = 'XYZ'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC1'.
t_excel_blkord-vbtyp = 'DEF1'.
t_excel_blkord-auart = 'GHI1'.
t_excel_blkord-ernam = 'JKL1'.
t_excel_blkord-vbeln = 'MNO1'.
t_excel_blkord-0008text = 'XYZ1'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC2'.
t_excel_blkord-vbtyp = 'DEF2'.
t_excel_blkord-auart = 'GHI2'.
t_excel_blkord-ernam = 'JKL2'.
t_excel_blkord-vbeln = 'MNO2'.
t_excel_blkord-0008text = 'XYZ2'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC3'.
t_excel_blkord-vbtyp = 'DEF3'..
t_excel_blkord-auart = 'GHI3'.
t_excel_blkord-ernam = 'JKL3'.
t_excel_blkord-vbeln = 'MNO3'.
t_excel_blkord-0008text = 'XYZ3'.
append t_excel_blkord.
t_excel_blkord-vkorg = 'ABC4'.
t_excel_blkord-vbtyp = 'DEF4'..
t_excel_blkord-auart = 'GHI4'.
t_excel_blkord-ernam = 'JKL4'.
t_excel_blkord-vbeln = 'MNO4'.
t_excel_blkord-0008text = 'XYZ4'.
append t_excel_blkord.
loop at t_excel_bckord.
concatenate
t_excel_bckord-vkorg
t_excel_bckord-vbtyp
t_excel_bckord-auart
t_excel_bckord-ernam
t_excel_bckord-vbeln
t_excel_bckord-posnr
t_excel_bckord-erdat
t_excel_bckord-vdatu
t_excel_bckord-reqdat
t_excel_bckord-condat
t_excel_bckord-lifsk
t_excel_bckord-txt30
t_excel_bckord-lifsp
t_excel_bckord-dispo
t_excel_bckord-dsnam
t_excel_bckord-vmsta
t_excel_bckord-kunnr
t_excel_bckord-cname
t_excel_bckord-regio
t_excel_bckord-cufd
t_excel_bckord-bstnk
t_excel_bckord-bsark
t_excel_bckord-matnr
t_excel_bckord-maktx
t_excel_bckord-t200
t_excel_bckord-vtext
t_excel_bckord-matkl
t_excel_bckord-zzbomind
t_excel_bckord-ostat
t_excel_bckord-cmgst
t_excel_bckord-inco1
t_excel_bckord-oqty
t_excel_bckord-pqty
t_excel_bckord-unit
t_excel_bckord-onet
t_excel_bckord-pnet
t_excel_bckord-curr
t_excel_bckord-so_bezei
t_excel_bckord-sg_bezei
t_excel_bckord-bname
t_excel_bckord-contact
t_excel_bckord-telf1
t_excel_bckord-reqqty
t_excel_bckord-reqval
t_excel_bckord-conqty
t_excel_bckord-conval
t_excel_bckord-zzrev
t_excel_bckord-bezei
t_excel_bckord-vgbel
t_excel_bckord-0008text
into it
separated by deli.
append it.
clear it.
endloop.
loop at t_excel_bcklog.
concatenate
t_excel_bcklog-vkorg
t_excel_bcklog-vbtyp
t_excel_bcklog-auart
t_excel_bcklog-ernam
t_excel_bcklog-vbeln
t_excel_bcklog-posnr
t_excel_bcklog-erdat
t_excel_bcklog-vdatu
t_excel_bcklog-reqdat
t_excel_bcklog-condat
t_excel_bcklog-lifsk
t_excel_bcklog-txt30
t_excel_bcklog-lifsp
t_excel_bcklog-dispo
t_excel_bcklog-dsnam
t_excel_bcklog-vmsta
t_excel_bcklog-kunnr
t_excel_bcklog-cname
t_excel_bcklog-regio
t_excel_bcklog-cufd
t_excel_bcklog-bstnk
t_excel_bcklog-bsark
t_excel_bcklog-matnr
t_excel_bcklog-maktx
t_excel_bcklog-t200
t_excel_bcklog-vtext
t_excel_bcklog-matkl
t_excel_bcklog-zzbomind
t_excel_bcklog-ostat
t_excel_bcklog-cmgst
t_excel_bcklog-inco1
t_excel_bcklog-oqty
t_excel_bcklog-pqty
t_excel_bcklog-unit
t_excel_bcklog-onet
t_excel_bcklog-pnet
t_excel_bcklog-curr
t_excel_bcklog-so_bezei
t_excel_bcklog-sg_bezei
t_excel_bcklog-bname
t_excel_bcklog-contact
t_excel_bcklog-telf1
t_excel_bcklog-reqqty
t_excel_bcklog-reqval
t_excel_bcklog-conqty
t_excel_bcklog-conval
t_excel_bcklog-zzrev
t_excel_bcklog-bezei
t_excel_bcklog-vgbel
t_excel_bcklog-0008text
into it_2
separated by deli.
append it_2.
clear it_2.
endloop.
loop at t_excel_blkord.
concatenate
t_excel_blkord-vkorg
t_excel_blkord-vbtyp
t_excel_blkord-auart
t_excel_blkord-ernam
t_excel_blkord-vbeln
t_excel_blkord-posnr
t_excel_blkord-erdat
t_excel_blkord-vdatu
t_excel_blkord-reqdat
t_excel_blkord-condat
t_excel_blkord-lifsk
t_excel_blkord-txt30
t_excel_blkord-lifsp
t_excel_blkord-dispo
t_excel_blkord-dsnam
t_excel_blkord-vmsta
t_excel_blkord-kunnr
t_excel_blkord-cname
t_excel_blkord-regio
t_excel_blkord-cufd
t_excel_blkord-bstnk
t_excel_blkord-bsark
t_excel_blkord-matnr
t_excel_blkord-maktx
t_excel_blkord-t200
t_excel_blkord-vtext
t_excel_blkord-matkl
t_excel_blkord-zzbomind
t_excel_blkord-ostat
t_excel_blkord-cmgst
t_excel_blkord-inco1
t_excel_blkord-oqty
t_excel_blkord-pqty
t_excel_blkord-unit
t_excel_blkord-onet
t_excel_blkord-pnet
t_excel_blkord-curr
t_excel_blkord-so_bezei
t_excel_blkord-sg_bezei
t_excel_blkord-bname
t_excel_blkord-contact
t_excel_blkord-telf1
t_excel_blkord-reqqty
t_excel_blkord-reqval
t_excel_blkord-conqty
t_excel_blkord-conval
t_excel_blkord-zzrev
t_excel_blkord-bezei
t_excel_blkord-vgbel
t_excel_blkord-0008text
into it_3
separated by deli.
append it_3.
clear it_3.
endloop.
if h_excel-header = space or h_excel-handle = -1.
* start Excel
create object h_excel 'EXCEL.APPLICATION'.
endif.
* PERFORM err_hdl.
*--- get list of workbooks, initially empty
call method of h_excel 'Workbooks' = h_mapl.
* PERFORM err_hdl.
set property of h_excel 'Visible' = 1.
* add a new workbook
call method of h_mapl 'Add' = h_map.
* PERFORM err_hdl.
*GV_SHEET_NAME = '1st SHEET'.
gv_sheet_name = 'Back Orders'.
get property of h_excel 'ACTIVESHEET' = worksheet.
set property of worksheet 'Name' = gv_sheet_name .
*--Formatting the area of additional data 1 and doing the BOLD
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 50.
call method of h_excel 'Range' = h_cell
exporting
#1 = w_cell1
#2 = w_cell2.
*CALL METHOD OF gs_cells 'Select' .
get property of h_cell 'Font' = gs_font .
set property of gs_font 'Bold' = 1 .
data l_rc type i.
call method cl_gui_frontend_services=>clipboard_export
importing
data = it[]
changing
rc = l_rc
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 1.
* PERFORM err_hdl.
call method of h_excel 'Range' = range
exporting
#1 = w_cell1
#2 = w_cell2.
call method of range 'Select'.
* PERFORM err_hdl.
call method of worksheet 'Paste'.
* PERFORM err_hdl.
* CALL METHOD OF h_excel 'QUIT'.
*GV_SHEET_NAME = '2ND SHEET'.
gv_sheet_name = 'Backlog'.
get property of h_excel 'Sheets' = h_sheet2 .
call method of h_sheet2 'Add' = h_map.
set property of h_map 'Name' = gv_sheet_name .
get property of h_excel 'ACTIVESHEET' = worksheet.
*--Formatting the area of additional data 1 and doing the BOLD
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 50.
call method of h_excel 'Range' = h_cell
exporting
#1 = w_cell1
#2 = w_cell2.
get property of h_cell 'Font' = gs_font .
set property of gs_font 'Bold' = 1 .
call method cl_gui_frontend_services=>clipboard_export
importing
data = it_2[]
changing
rc = l_rc
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 1.
* PERFORM err_hdl.
call method of h_excel 'Range' = range
exporting
#1 = w_cell1
#2 = w_cell2.
call method of range 'Select'.
* PERFORM err_hdl.
call method of worksheet 'Paste'.
*GV_SHEET_NAME = '3rd SHEET'.
gv_sheet_name = 'Blocked Orders'.
get property of h_excel 'Sheets' = h_sheet3 .
call method of h_sheet3 'Add' = h_map.
set property of h_map 'Name' = gv_sheet_name .
get property of h_excel 'ACTIVESHEET' = worksheet.
*--Formatting the area of additional data 1 and doing the BOLD
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 50.
call method of h_excel 'Range' = h_cell
exporting
#1 = w_cell1
#2 = w_cell2.
get property of h_cell 'Font' = gs_font .
set property of gs_font 'Bold' = 1 .
call method cl_gui_frontend_services=>clipboard_export
importing
data = it_3[]
changing
rc = l_rc
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
call method of h_excel 'Cells' = w_cell1
exporting
#1 = 1
#2 = 1.
call method of h_excel 'Cells' = w_cell2
exporting
#1 = 1
#2 = 1.
* PERFORM err_hdl.
call method of h_excel 'Range' = range
exporting
#1 = w_cell1
#2 = w_cell2.
call method of range 'Select'.
* PERFORM err_hdl.
call method of worksheet 'Paste'.
*--- disconnect from Excel
free object h_zl.
free object h_mapl.
free object h_map.
free object h_excel.
Regards
Sudheer

Similar Messages

  • I am using a doc formatted on excel --- how do i resize the doc to fit on one page?

    I am using a document that was formatted in excel (on a PC) --- how do i resize the document to print on one page?

    Hi phylw,
    Here is one way. View > Show Print View. At the bottom of the window is a slider control called Content Scale. Slide to the left to shrink the document.
    Under File > Print... you will see a print preview that tells you how many pages the document now occupies.
    Regards,
    Ian.

  • How to read data from a file that was formatted by excel?

    Hi everyone, I'm familiar with java.io and the ability to read from files, can anyone tell me how to read data from a file that was formatted by excel? Or at least give me some web references so that I can learn about it?

    http://jakarta.apache.org/poi/hssf/index.html
    HSSF stands for Horrible Spreadsheet Format, but it still works!

  • Change in report format after exporting from pdf format to excel format.

    Hi,
    I got a problem while exporting the pdf format of the Report to Excel format "Fully-Foramtted Grids and Texts".
    The format gets automatically changed.
    Is there any solution to this problem.

    Can you give some more details?
    Which version are you using (and which patch level - if any).
    Also what formatting is default on the reports and what is the default format in excel.
    What exactly is different between PDF and excel?
    Another possibility is that font substitution is going on??

  • Formating an excel file by BSP Download

    I have made a BSP application which can dowload file into an excel file.But now i have a requirement in which i have to format the excel file with colour and cell width.I have to colour the column  header of the excel file with some colours like blue,red etc.
    Please suggest me how we can achieve this?
    Thanks and regards,
    Manish Kumar

    Hi Manish,
    This can be achieved using javascirpts and active x objects. Check this wiki,
    http://wiki.sdn.sap.com/wiki/display/CRM/DownloaddatafromwebuitoExcelandPPT
    Regards,
    Arun

  • Formatting of EXCEL Sheets during download

    Hi all,
    There is a requirement for Formatting EXCEL Sheets when downloaded into an FTP site in background.
    The internal table is saved in application server with .xls extension and transferred to FTP thru RFC.
    is there any way to format this EXCEL file and get it formatted in FTP when it is seen.
    The report will run in background daily and every day the report has to be in same format.
    Thanks in Advance..
    Vivek ..

    Hi
    You can not format EL file that is uploaded. You have to format the internal table before generation XL file from the internal table. Internal table should have all fields in char type. set char length for each field like
       data: begin of itab..
               field1(20) type c,
               field2(20) type c,
    Append header record if u want into this itab as first record.
    Append all records into this itab.
    Generate XL file from this itab.
    I suggest you that..
    Upload this itab in to application server as 'DAT' format then generate XL file from this file. Dont set .xls when you upload itab to appl. server.
    Bala
    Note: Award points if helpful

  • Date format in excel

    hi all,
    i am using form6i.
    i am writing data into excel sheet(using ole2 package). i have one date column among them. The date format in excel should be in 'DD/MM/YYYY'.
    In my form i have date format like 'YYYY/MM/MM HH:MI:SS'. so i have converted that column using
    TO_CHAR(TRUNC(:date_col),'DD/MM/YYYY').So i am getting output in the format what i need,but still in excel i am seeing data format as 'DD-MM-YY'.
    is any conversion is required while writing into excel?
    but when i set the excel data format should be in 'DD-MON-YYYY'
    i am getting output as '26-JAN-10' but i want output in excel like
    '26/JAN/2010'.
    Please help.
    Thanks..
    Edited by: GD on Nov 26, 2011 8:21 PM

    If you want the field to be treated like a DATE in excel, you have to set the column-format to DATE and apply the appropiate Format. To get the needed ole-statements, start the macro-recorder, do the changes in excel and then check whats written in the macro and convert it to OLE.
    If the field should only be shown as a date, you can put a ' in fornt of the date-value.

  • Converting the rulesets from .txt format to Excel?

    Dear all,
    Is there a conversion utility available to convert GRC rulesets which have been exported from the tool in .txt format to excel? I am looking for something which can break up the rulesets into various tabs with  in the main worksheet. Currently when I do a "open with excel" function, all the data gets dumped onto a single excel sheet.
    Thanks,
    Edited by: Kenguru on Aug 14, 2010 11:41 PM

    Hi,
    Open the .txt file with word pad. copy and paste the data in excel sheet. you can get the data of each column in different tab.
    Hope this is useful
    all the best

  • Calculated Percentage Columns in Pivot Table loose formating in Excel

    I have a simple report built using pivot table ( OBIEE 11.1.1.5.0)
    1 Metric and 1 dimension using pivot table. and I duplicated the metric column and change it to % column.(Show data as % of column). SO far so good. Below is the snapshot
    http://tinypic.com/r/2s14xa9/7
    Now i download the report in excel and all the % values are messed up . Below is how it looks
    http://tinypic.com/r/bede90/7
    I tried messing with data formats etc..nothing works.. I cannot add a custom column format to the metric column since it will impact the derived % column.
    Is this a bug ?Any pointers ..
    Thanks

    Hi,
    Follow up this SR:
    SR 3-5060435331: Calculated Percentage Columns in Pivot Table loose formating in Excel
    Workaround: (not sure may be give a try)
    also give a try like below one then try to download it may work.
    In that % column -->add the below statement in the Custom CSS section of the column properties:
    mso-number-format:"\@"
    Refer snapshot here:
    http://i53.tinypic.com/a09kqv.jpg
    This will treat the data in the column as text while downloading to excel, hence retaining any leading or trailing spaces.
    Thanks
    Deva

  • Field format in Excel - losing leading zero

    I have field in query, which is varchar2 in database, but contains only numbers, most of which have leading zeros, i.e. '0123'.
    When the report is viewed as html, pdf, or rtf data is shown correctly, '0123', but when viewed in Excel, the data is '123'.
    Also, I have a column that is simmilar to this one - varchar2 containing only numbers (SSCC if anyone is familiar). This information is 17 characters long, so instead of '38503341002862100' i get '3,85033E+16' in Excel.
    I noticed in both cases that the cell format in Excel is general, instead of text.
    How can this be changed?

    hi arubelj,
    Excel sheet is made specificaly for number calculations.....and each cell which is having data is by default considered as number...and in numbers 0123=123 ,this is the reason why it is not displaying 0 in start..... i had cheched the excel setup options also..... but did not found anything there to change the default column or row type as text....
    Regards
    Ravi

  • Read Custom format of Excel

    I want to read custom date format from excel through JAVA:
    Issue:
    In my excel cell is of custom format MMYYYY. Which is 011900.
    When i click on it It shows me 1/0/1900. I am using jxl.jar for reading excel.
    When i am reading it through java it is not taking date as 0. So it is gicing me value 121899. Dont Know why??? Could you please help me. Its very critical to my project.
    Thanks in adance.

    There could be weird Excel stuff happening, or weird JXL stuff, but basically here's what is happening:
    You have Day 0 of Month 1 of 1900. This is treated as the day before Day 1 of Month 1 of 1900, which if you get out your calendar you will see is actually Day 31 of Month 12 of 1899. And if you look at that with a format which displays only the month and year, you'll see 12 as the month and 1899 as the year.
    So: don't treat something with only month and year as a Date, unless you're prepared to fill in the day part properly.

  • How to retain format in excel?

    Is there any way to retain formatting in excel once a retrival is done i.e. Total bold and underlined?Thanks,Calvin

    As long as I remember, you can do this by unchecking the "Use styles" check-box in Essbase/OptionsRegards.

  • Controlling the data formatting in excel using jsp.

    Hi,
    How to controlling the data formatting in excel using jsp with out using external jar files such as "jexcel" and "POI". And one more limitation is that it should be compatible with java 1.2.1

    dineshniot wrote:
    Hi - Is there any possibility to automatically display the chart for the logged datas using write to measurement file or write to data file? Please let me know as soon as possible.
    Thanks and Regards,
    Dinesh
    As an aside, "data" is already a plural.  The singular is "datum."
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • To format an Excel worksheet invoked by oracle form using DDE functions

    I'm exporting data from oracle form6 into excel sheet using DDE functions.
    Is there any DDE functions to format the excel sheet.

    Maybe you can use format commands through DDE (if the DDE server suports them) but I personally don't know.
    My approach is to record an excel macro which formats your sheet and then invoke the macro through DDE. You can fill cells with control numbers (like number of rows, number of cells) so you can make your macro even smarter by reading these numbers.

  • Formating MSA Excel Reports created in MSY

    Hello All,
    we want to format a excel report, that was created in MSY.
    for example we use the Business Query BSACTIVITY with 'from' and 'to' date parameters.
    The result is then in the Excle sheet BSACTIVITY.
    We have created some programming in the sub "Workbook_BeforeSave"
    to copy the data from BSACTIVITY to a new sheet called Calender.
    When we run the report creation a second time, the data is written to the same file again, but is not creating a new workbook.
    Has anyone experience with the formating of those excelreport ?
    We run CRM 40 SP 09.
    Thank you for your help.
    Best reagards
    Frank

    Hi,
    I just want to push this topic.
    For me it's the same problem. I want to format a Excel report which was created in MSY.
    How can it be done to save the customized design of the excel sheet? Is it possible to save the design in MSY or is it necessary to create an excel makro?
    Thanks in advance!
    Regards,
    Christian

Maybe you are looking for

  • Function module to retrieve the account number linked to an SD invoice item

    Hi all, I should retrieve the gl account number linked to a certain SD invoice item. The program starts from VBRK and VBRP data. Is there a function module which enables to get it starting from these header lines? I already used the function module:

  • Exception while running hello world program

    Hi OAF guys i am getting the following exception when i am trying to run the Hello world example. Any body knows this problem, respond asap Exception Details. oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE.

  • Firefox won't run because it 'is already running' I have tried all steps in firefox crashes articles

    I had a spectacular crash in Firefox (FF) - Malware or a virus - I think my system is clean now. I removed FF and all FF/Mozilla files, downloaded a new FF. It will not run because: "Close Firefox A copy of Firefox is already open. Only one copy of F

  • ZLSCH in customer manual payment

    Good morning, As you can see from my picture , i have an invoice with payment condition  equal to "C" ... Why in the payment transaction I cannot see the same payment condition? See the row where I put the label "payment"... I would like to use FBl5N

  • Java & security/Privacy Problem

    Hello wonder if you could help or give advice (An idiots answer for a idiot like me is prefered) when using a fully Anonymous proxy even with (Cookie via java script:;Private ) web Browser and sun java shows your real IP in java ip fetch scripts and