Excel in background with formating option
Hi,
Is it possible to add logo, column width to excel in background. My requirement is to send excel as a attachment.This program run in background where i need to send excel as attachement via mail with logo and column width and demicals formatting etc.
Is it possible to do this in background with excel. some links r code will help more.
Regards,
Karthik
I read somewhere that simple excel creation and formatting is possible if you use open dataset and create an xml file
it is a very complex approach and yet you will still not be able to put things such as the logo an column width
the main reason for not being able to do this is the fact that excel creation is normally done by using Object Linking and Embedding (OLE)
This works only by having the document open in the foreground and cannot work in the background
Similar Messages
-
"Send an E-Mail in Background with Attachment (Optional)" can't be called
hi
i tried notice from gp's mail template via other object.
it's successed.
but when i tried CO "Send an E-Mail in Background with Attachment (Optional)", and code like follows:
IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
params.setAttributeValue("email_address", receiverMailAddress);
params.setAttributeValue("customer_Name", receiverName);
params.setAttributeValue("context", context);
if (document != null) {
IGPStructure attachment = params.addStructure("ATTACHMENT_1", "com.sap.caf.eu.gp.types.File");
attachment.setAttributeValue("Name", "com.sap.caf.eu.gp.types.File", documentName);
attachment.setAttributeValue("ContentType", "com.sap.caf.eu.gp.types.File", documentContentType);
attachment.setAttributeValue("Size", "com.sap.caf.eu.gp.types.File", document.length);
attachment.setAttributeValue("Content", "com.sap.caf.eu.gp.types.File", document);
it ain't work.
also, did not throw any exception.
i found some exception message from log viewer
null
com.sap.caf.eu.gp.base.exception.EngineException
at com.sap.caf.eu.gp.model.fnd.mail.MailSendingUtility.sendMailThrowsExc(MailSendingUtility.java:889)
at com.sap.caf.eu.gp.model.fnd.mail.MailSendingUtility.sendMailThrowsExc(MailSendingUtility.java:837)
at com.sap.caf.eu.gp.callobj.mail.NotificationCOwithAttachment.onExecute(NotificationCOwithAttachment.java:394)
at com.sap.caf.eu.gp.callobj.bckgd.base.AbstractBackgroundCallableObject.execute(AbstractBackgroundCallableObject.java:102)
at com.sap.caf.eu.gp.callobj.container.BackgroundCallableObjectsContainer.execute(BackgroundCallableObjectsContainer.java:82)
i work with netweaver 7.11 ehp1 sp3.
please help if you can, thank you very much.Hi, Dipankar:
Thanks for your reply. But I have no idea about how to group parameter from all uploaded file to "Send an E-Mail in Background with Attachment" CO?
For the situation, I write a background CO program to get all uploaded file (from first three block) and grouping this customized CO parameter with "Send an E-Mail in Background with Attachment" CO. -
Create excel in background with data sheet
any way to create a excel with data sheet with specific name in background?
Hi try this simple program.Instead of giving hard-coded file name as i did in this report, you can take the filename dynamicaly from a selection screen parameter. if you call this report from some other program by "submit .." statement, t runs in back ground.
DATA: BEGIN OF intab occurs 0,
mandt LIKE mara-mandt,
matnr LIKE mara-matnr,
ersda LIKE mara-ersda,
ernam LIKE mara-ernam,
laeda LIKE mara-laeda,
aenam LIKE mara-aenam,
END OF intab.
start-of-selection.
select mandt matnr ersda laeda aenam from mara
into corresponding fields
of table intab up to 30 rows.
loop at intab.
write:/ intab-matnr,intab-ersda,intab-ernam,intab-laeda,intab-aenam.
clear intab.
endloop.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ','
I_LINE_HEADER =
i_filename = 'c:\test123.xls'
I_APPL_KEEP = ' '
tables
i_tab_sap_data = intab.
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif. -
How to provide text formatting options to user from a text field
Hi,
My requirement is - in the interactive form, a comments field needs to be provided where user should be able to enter text with formatting options like
Headers
indentations
bold/italic
bullet points and numbers
Once user enters the formatted texts in a text field, data needs to be displayed/printed in the same format. Could you help me on how to provide these formatting options to the user for a particular text field?
I understand that once I define the text field with format XHTML (with RTF), user formatting can be captured and displayed in the same way. But I am not sure on how to provide the formatting options for the text field.
Thank you,
MadhuHi,
if you select a text field for Rich Text and the press Ctrl + E you'll get a bar for all available text formatting options in Acrobat/Reader. -
How to include formating options present in "FormatTextEdit" UI element in Smartform
Hi All,
I need your help in below requirement
We need to use FormatTextEdit UI element in our WDA, so that text entered in UI element along with formatting options needs to be printed in PDF form through smartform.
We are using Smartform to get PDF not adobe form. So we are facing issue in converting HTML tags which we get as a result of "FormatTextEdit" UI element in smartform.
In PDF ( which is generated using Smartform inside our component), HTML tags are getting printing like
We tried using "cl_wd_formatted_text", but could not find solution in integrating those HTML tags inside our smartform.
Is there is any FM or Utility to convert HTML tags to smartform or any other approach to fulfil our requirement?
Please help.
Thank you
SangeethaHi,
You can convert smart form or RTF text to HTML tags but not the other way. There is no such provision. You can check the class CL_WD_FORMATTED_TEXT which has method to convert smartform/sap script to /formatted text . May be you can check that and try to do the reverse way.
But SAP doesn't have any such provision to convert HTML to other formats.
Hope this helps,
Regards,
Kiran -
Export Excel - with formatting
Dear Friends,
I am exporting the tableview data to the excel using the response->append_cdata function.
I want to export the data byusing formatting options.
For example, I want to export all mycolumn names in Bold letters, with background colors in the excel sheet....
If anybody have a clue on this please help...Hi,
Excel has a binary format that is very difficult to produce in a "non-Microsoft" environment such as BSP.
There are several post about this kind of issues in the forum.
I think your best shot is to produce XML format for Excel but for this, you need :
Excel 2007
Excel 2003 + Compatibility Pack
on the client side.
Have a look at this page if you want to know about Office 2007 format
http://www.developerfusion.co.uk/show/6170/
Best regards,
Guillaume -
We're using Crystal 11.5 & 12 .NET interface.
We want to set certain export formatting options for the Excel Data Only export format and have not been able to find the appropriate properties or methods in the documentation. We have used the following code with the COM interface which works properly. However we have been unable to make this work in .NET. The list of the properties are as follows:
ExportOptions.ExcelExportAllPages = True
ExportOptions.ExcelExportImagesInDataOnly = True
ExportOptions.ExcelUseWorksheetFunctions = True
ExportOptions.ExcelMaintainRelativeObjectPosition = True
ExportOptions.ExcelMaintainColumnAlignment = True
ExportOptions.ExcelExportPageAreaPair = True
Does anyone know what the appropriate .NET methods/properties are for Excel Data Only export?You will have to use the RAS SDK. Download the Report Application Server 12 SDK help file from here:
http://help.sap.com/businessobject/product_guides/boexir31/en/rassdk_net_apiRef_12_en.chm
and then search for export. Then see ExcelExportFormatOptionsClass properties.
For more info re. RAS see:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10b840c0-623f-2b10-03b5-9d1913866b32
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050afe0-2fa5-2b10-658d-98f214ba6a4a
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f006a5e6-7e64-2b10-8a84-8b15ca5cacfc
https://www.sdn.sap.com/irj/boc/businessobjects-samples?rid=/webcontent/uuid/b02c1cac-ad86-2b10-88ae-cb36551bab06 [original link is broken]
Ludek -
Hyperion IR 11 -Export to Excel with formatting
Hi,
we have problem in exporting pivot sections to excel with the format intact.
Is there really an option in Hyperion IR 11, to use this as such?
I have a script that creates excel, by creating a MHTML And converting it to excel.
But I need to know other options as well.
Thanks in advance.Hi~
I get the same question.
I export pivot sections to excel with the format intact, but it did not work.
When export pivot sections to excel can not with the format intact
My script below:
ActiveDocument.Sections["sectionname"].Export('C:\\test.xls',bqExportFormatOfficeMHTML,true,true);
What is it wrong? Thanks~ -
Export to excel with formatting was autowrapping text in a cell
Export to excel with formatting was autowrapping text in a cell without having to check the can grow option. When the can grow option is checked it does wrap the text however it spans multiple rows, which causes complications when trying to sort.
It worked in:
ProductVersion=10.0.0.533
ProductName=Crystal Enterprise 10 Embedded
Doesnt work in:
Crystal Reports 10.0 Service Pack 6
After the upgrade the reports did not autowrap, b/c the "can grow" option was not checked. I believe this was fixed by "ADAPT00305137 Patch ID: 36479914
Description:
When users export to Excel 97-2000 with the page-based format, text fields are wrapped, even when the "can grow" feature in the
Designer is turned off." . After we turn the option to grow on it does wrap however it spans across multiple rows. So I guess my question is there a way for it not to span multiple rows when wrapping text?
Edited by: dforde on Jan 27, 2010 11:12 PMI could be wrong, but I believe the export to excel option exports the database values, and the export to HTML exports the values seen in the sheets. If the database values are stored as seconds, the Excel will see them as seconds, and the data will have to be formatted properly in Excel.
I haven't toyed around with Excel exports that much, but it might be possible to set up a template or macro in excel that would have the proper formatting, and use it when opening the Disco export. -
How do i open EPS file with "rasterize generic EPS format" options in photoshop CS?
Hi please can someone help!?
I'm using Photoshop CS on mac- when i open EPS format files i usually get the "rasterize generic EPS format" option so that i can select the size i want the file to be etc without losing quality. However on one file i've opened before i don't seem to be getting that option at all, if i open the EPs file it just goes to a standard size automatically and doesn't give me the chance to change the size. This is the same file that i have used since being sent the file, i've not resaved it. It used to give me the rasterize generic EPS format option but it no longer works. Any ideas how i can make those options appear when opening or how i can rasterize/resize it once open without losing quality?
Just to be clear, i still get the rasterize generic EPS format option when opening other EPS files but it seems not with this one particular file.
Many Thanks
RossEncapsulated PostScript-files can contain either vector-content (in which case one gets prompted when opening with Photoshop), pixel-content (in which case Photoshop opens straight away) or a mixture (same as the first case).
When a file has been rasterized that’s that, You may want to go back to the original file if You can locate it.
Edit: Sorry, I read Your original post carelessly …
Have You tried opening the original file in Illustrator yet? -
Certain web forms have formatting options like those found in Microsoft Word. They don't appear when I use Firefox, but do with IE of course. Is there a way to get it to display?
That formatting feature for text areas is known as Rich Text editing. Easy to enable on the web page with one line of code to tap into the Midas package that Mozilla uses, but the users can't enable it themselves from within Firefox.
http://kb.mozillazine.org/Rich_text_editing
http://kb.mozillazine.org/Midas
http://www.mozilla.org/editor/midas-spec.html -
Suppress "Excel format options" dialog when call CRPE
I'm looking at pretty old CRPE dll (written in Nov 1991)l now, to find a way to export excel without "Excel Format Options" dialog.
I have a crystal report and want to export to excel. Before call API function "PEStartPrintJob", want to set up all excel format options and then run the print job without the dialog popping up.
I have CR 9.0 installed on my computer.
Any idea?
Thanks.
Edited by: JasonLi on Jul 16, 2010 4:45 PMHi Jason,
Be aware that CR 9 is the last version you are licensed to use crpe32 as your report engine. It's be deprecated. Moving forward you'll have to move to Visual Studio .NET and use the Report Application server as the report engine.
Also be aware that the exporting format changed as of CR 8.5.
Here's the code that should work for you:
// Export to XLS
// Initialize members of diskOptions
memset(&diskOptions, 0, sizeof(UXDDiskOptions));
diskOptions.structSize = UXDDiskOptionsSize;
diskOptions.fileName = "c:
tmp
report.xls";
// PEExportOptions
memset(&XLSFormatOptions, 0, sizeof(UXFXlsOptions));
XLSFormatOptions.structSize = UXFXlsOptionsSize;
XLSFormatOptions.bExportAllPages = true;
XLSFormatOptions.bUseFormatInDataOnly = true;
// Initialize members of XLS format
memset(&exportOptions, 0, sizeof(PEExportOptions));
exportOptions.StructSize = PE_SIZEOF_EXPORT_OPTIONS;
lstrcpy(exportOptions.formatDLLName, "crxf_xls.dll");
//exportOptions.formatType = UXFXlRecDumpType;
exportOptions.formatType = UXFXl97Type;
// Initialize members of Destination Options
lstrcpy(exportOptions.destinationDLLName, "u2ddisk.dll");
exportOptions.destinationType = UXDDiskType;
exportOptions.destinationOptions = &diskOptions;
exportOptions.formatOptions = &XLSFormatOptions;
// Start Exporting
if (!PEExportTo(jobNumber, &exportOptions))
CString temp;
temp.Format("Error in PEExportTo %d", PEGetErrorCode(jobNumber));
AfxMessageBox(temp);
// Start the job
if (!PEStartPrintJob(jobNumber,true))
CString temp;
temp.Format("Error in PEStartPrintJob %d", PEGetErrorCode(jobNumber));
AfxMessageBox(temp); -
Copying SQL Script from Oracle SQL Developer into Excel with formatting
I need to copy a SQL Script into Excel in order to develop some VBA code. Is there any nice way that I can copy SQL Script from Oracle SQL Developer into Excel and retain its formatting? I am a stickler for having legible, readable SQL and like to have all my columns lined up and aliases lined up. When we used to use SQL Navigator, the tab formatting seemed to copy and paste just fine. Now that we have migrated to Oracle SQL Developer, the formatting seems to get all messed up.
And suggestions are greatly appreciated and Thanks in advance for your review and am hopeful for an answer.
Thanks.
PSULionRPI suppose you want a real tabulator instead of spaces. You can configure this in the preferences (SQL Formatter - Oracle). You have to apply it then to your existing code (e.g. CTRL-F7), but new code should get it right from the start.
Hope that helps,
K. -
Email functions - formatting options, PDF attachme...
I was typing an email and liked the autocorrect function, auto spacing...
BUT there are no text formatting options whatsoever??
There is no undo button??
There is no attachment capability..only pics.?? No PDF, word, excel??
Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post.Sorry I ain't done yet. My trigger happy go lucky phone send the message at a flash. I tried to work around the none formatting issue using the word in the office but as I could not get it to work as expected within reasonable amount of time and number of tries I gave up. If you format a phrase and copy it it just copies the last format and ignores the copied formatting. Plus how do you make the f. Keyboard go away easily? Why internet has no forward arrow, only back! Is this some kind of joke? Why when texting can't you move back and forth with arrows, just the stupid cursor. NO undo function????? Elementary mr Watson, elementary. +You have to be an oracle to guess when an app will close when u hit the back arrow rather than go back!! Apps must not close like that. Pretty disheartening. Pretty pretty for a good looking phone like this.
And to be honest I am not going to buy a new phone for another three to four years come hell. Unless wify breaks my old one she uses now and I give her the brick.
Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post. -
Exporting data from table to Excel in a particular format using BSP.
Hello all,
I am creating a application in BSP wherein i have to export data to excel sheet.
I am able to do that but the output in excel sheet is not formatted. it is displaying the data in a single
column. For example, the internal table which i am exporting to excel contains fields "product
name", "area name", country name", "values". all these should be displayed in different columns.How
can i achieve this functionality.A sample code will be of great help..
Below is the code i hav written for exporting to excel :
data: l_len type i,
l_string type string,
app_type type string,
file_content type xstring,
file_mime_type type string.
create OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
cached_response->set_data( file_content ).
cached_response->set_header_field(
name = if_http_header_fields=>content_type
value = file_mime_type ).
LOOP AT itab_xls INTO wa_xls.
CONCATENATE L_STRING wa_xls-product_name
wa_xls-area_name
wa_xls-landx
CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
ENDLOOP.
APP_TYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'.
data: l_xstring type xstring.
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = l_string
MIMETYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'
IMPORTING
BUFFER = l_xstring.
Add the Byte Order Mark - UTF-16 Little Endian
concatenate cl_abap_char_utilities=>byte_order_mark_little
l_xstring
into l_xstring in byte mode.
cached_response->set_data( l_xstring ).
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = 'APPLICATION/MSEXCEL; charset=utf-16le' ).
*Set the filename into the response header
cached_response->set_header_field( name = 'Content-Disposition'
value = 'attachment; filename=gkb_excel.xls' ).
*Set the Response Status
cached_response->set_status( code = 200 reason = 'OK' ).
*Set the Cache Timeout - 60 seconds - we only need this in the cache
*long enough to build the page and allow the IFrame on the Client to request it.
cached_response->server_cache_expire_rel( expires_rel = 60 ).
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = guid.
CONCATENATE runtime->application_url '/' guid '.xls' INTO url.
cl_http_server=>server_cache_upload( url = url
response = cached_response ).
Can anyone help me with some solution.
Thanks in advance.
Gurmahima.the issue is here
LOOP AT itab_xls INTO wa_xls.
CONCATENATE L_STRING wa_xls-product_name
wa_xls-area_name
wa_xls-landx
CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
ENDLOOP.
instead do the following
LOOP AT itab_xls INTO wa_xls.
CONCATENATE L_STRING wa_xls-product_name ','
wa_xls-area_name ','
wa_xls-landx ','
CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING .
ENDLOOP.
and then change the file name extension from xls to csv. it should open properly in excel.
Note that this is only excel csv file. if you want a proper excel excel file, then
option one: build a html table with your data into a string and pass it to excel
option 2: build excel xml using your data into a string and pass it to excel.
Regards
Raja
Maybe you are looking for
-
How to view gif files...
Hi I have launched swing application in webstart. I have used some gif file in my application. While creating Jar file I have added all the gif files also. But I couln't view that gif files while running the application on the webstart. Thanks in adv
-
How to get the special symbols in item description in purchase requisition
hi, My client requiremnt is when i write some special character like(u221E,u03B2) in ms-word and copy the text & paste in purchase requisition screen in item description field ,the special character appear has Square box(instead of u221E,u03B2). ki
-
F4 for selecting folder from front end
Hi, The function module KD_GET_FILENAME_ON_F4 can be used for selecting a file from the front end. Similar way, I need to select a folder name (not specific file in it) through F4 help on to a parameter entry on the selection screen. Anyone can help
-
Customer Master - Restrict Acess at Field Level
Hi, I have a requirement where in the customer master I need to restrict access to a field to 2 users. Only these 2 users should be able to edit this specific field. For all other users, this field should be read-only. This is for both VD01 and VD02.
-
Connect to an Oracle database by using oracle.jdbc.OracleDriver: error
Hi, I'm trying to connect to an Oracle database so we can retrieve notes of tables, views and packages. By using the API of Data Modeler (transformation script) we want to add these notes to corresponding objects in Data Modeler. I'm starting with th