How to set border of excel cell through ole ?
How to set border either of left / right / top / bottom of excel cell through ole ?
Click on the outside the line above header and select all the columns and rows and set the border horz and vert this will solve your problem. if you select current data alone then it will select the current data alone borders. if you runa diff criteria then for the new values borders wont be there. so better always try selecting the column top i.e above the column header and set the border.
Similar Messages
-
Hi,
I have an XML file, which I'm opening with the Excel application. The stylesheet I use is horizontal.xsl.
The problem arised when the XML has data in the format "1/4" or "1/16", which is translated in the Excel as date (like "01/04/2007").
I think I have to set the default cell type to "Text" instead of "General". Does anyone know how it can be done?Is this the same question as idoZo, if so jigg has already answered it. If not then you should post your own query not hijack someone elses giving a clear and concise question, "how to set it??" doesn't help you or other in the forum to provide you with a solution.
Is this relevant to TestStand? If it is then help by providing which version you are using and what software you are using with it. If not then post your question in the correct board.
Regards
Ray Farmer -
How to set Border in the Excel using UTL_FILE ?
Hi all,
Any one aware of
How to set Border in the Excel using UTL_FILE ?
Am doing excel creation from a stored procedure.
Thanks
DoraHello Dora,
if you need more than simple csv: at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the package behind the second link supports defining your own formats (and has a tutorial how to do it).
Regards
Marcus -
How to set border lines in table and also in template in the smartforms ?
How to set border lines in table and also in template in the smartforms ?
As I have to create table with following detals
total row = 3
row1 = 3 column
row2 = 6 column
row3 = 9 column
for 2nd and 3rd row data to be fetched using coding.
so can anybody explain me what should i use
Table or Template ?
and I want the border like excel format.
Can anybody suggest me ?
Thanks
nareshif the data is multiple i.e. line items choose table.
if the data is single i.e. fixed choose template.
Create table
> Draw u r no lines
> choose option select pattern
> select display framed patterns
Choose u r required one.
out lined, or full lined. u can choose option.
same procedure to be followed for template also.
with regards,
Kiran.G -
How to upload datas in excel sheet through BDC
Hi,
I know how to upload datas in Text format through BDC...Suppose even when datas are in .xls format,I saved that file as Text(tab delimited) format...then file become text format and it can be easily uploaded....
So, I want to know How to upload datas in excel sheet through BDChi,
try this Example, hope useful to u, assign me point.
report ZMSV1_BDC_CALL
no standard page heading line-size 255.
*include bdcrecx1.
*parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: BUKRS
BUKRS_001(004),
data element: KTOKK
KTOKK_002(004),
data element: NAME1_GP
NAME1_003(035),
data element: SORTL
SORTL_004(010),
data element: ORT01_GP
ORT01_005(035),
data element: LAND1_GP
LAND1_006(003),
data element: SPRAS
SPRAS_007(002),
data element: BANKS
BANKS_01_008(003),
data element: BANKK
BANKL_01_009(015),
data element: BANKN
BANKN_01_010(018),
end of record.
End generated data section ***
data: itab like record occurs 0 .
data: it_bdc type bdcdata occurs 0 with header line.
data: it_msg type bdcmsgcoll occurs 0 with header line.
parameter p_file type rlgrap-filename default 'c:\vendor.txt' obligatory
start-of-selection.
perform open_dataset using p_file.
perform open_group.
*perform close_group.
*perform close_dataset using dataset.
*& Form open_dataset
text
-->P_P_FILE text
form open_dataset using p_p_file.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = p_file
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " open_dataset
*& Form open_group
text
--> p1 text
<-- p2 text
form open_group .
loop at itab into record.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-BUKRS'
record-BUKRS_001.
perform bdc_field using 'RF02K-KTOKK'
record-KTOKK_002.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-ORT01'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
record-NAME1_003.
perform bdc_field using 'LFA1-SORTL'
record-SORTL_004.
perform bdc_field using 'LFA1-ORT01'
record-ORT01_005.
perform bdc_field using 'LFA1-LAND1'
record-LAND1_006.
perform bdc_field using 'LFA1-SPRAS'
record-SPRAS_007.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-KOINH(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'LFBK-BANKS(01)'
record-BANKS_01_008.
perform bdc_field using 'LFBK-BANKL(01)'
record-BANKL_01_009.
perform bdc_field using 'LFBK-BANKN(01)'
record-BANKN_01_010.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0215'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0220'.
perform bdc_field using 'BDC_CURSOR'
'LFB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
call transaction 'FK01' using it_bdc mode 'A' update 'S'
messages into it_msg.
write:/ sy-subrc.
perform message_formatwrite.
refresh it_bdc.
clear it_bdc.
endloop.
endform. " open_group
*& Form message_formatwrite
text
--> p1 text
<-- p2 text
form message_formatwrite .
data:l_msg(10).
loop at it_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = sy-langu
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = l_msg
EXCEPTIONS
NOT_FOUND = 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.
endloop.
endform. " message_formatwrite
*& Form bdc_dynpro
text
-->P_0112 text
-->P_0113 text
form bdc_dynpro using value(p_0112)
value(p_0113).
it_bdc-program = p_0112.
it_bdc-dynpro = p_0113.
it_bdc-dynbegin = 'X'.
append it_bdc.
clear it_bdc.
endform. " bdc_dynpro
*& Form bdc_field
text
-->P_0117 text
-->P_0118 text
form bdc_field using value(p_0117)
value(p_0118).
it_bdc-fnam = p_0117.
it_bdc-fval = p_0118.
append it_bdc.
clear it_bdc.
endform. " bdc_field
Regards
fareedas -
How to set input ready query cell is different color?
Dear All
Hi, everyone, hereby i have a IP question.
i would like to know, how to set the input ready query's cell different color between those cell which is unable to change value one in workbook..?
Example :
For my workbook which have a input ready query,
i have 4 rows for my input ready query report.
For the first row which is not input ready cell and unable to change any value for the cell, then following rows's cell can be change value,
so, i would like to make first row's color cell different with following row's cell.
In additional, all value of cell is initial zero.
therefore, is there any mehtod to make different color between able cell and unable cell?
Thanks a million.
Regards,
WenLong.Cells in the input ready query result have different styles given by SAP. All rows will have one style, column headings will have one style whereas input ready cells will have one style. If you are in Excel 2003, put cursor in the input ready cell, goto format -> style, you can see one BeX style attached to that cell, apply watever color you want for that style, save the workbook. If you do this for one cell, it will be applied to all the input ready cells by default. In the same way you can give different color to the non input ready cell styles. In Excel 2007, Cell styles are available in Home -> Cell styles. Here you can see all Bex related styles.
-
How to set WebLogic Plug-In Enabled through admi in weblogic server 9.2
Hi,
how to set WebLogic Plug-In Enabled parameter for cluster through admin console in weblogic server 9.2 ???
Actually i could able to find the option for individual servers. However i could not able to find the same for cluster??
is it through only by WLST ???
can any one please advice??
regards,
Praveen Kumar JWell, I don't know what you call a "BEA Admin", but please note that everyone here is trying to help.
Some of them are not working for BEA but are deeply efficient.
Well, for your problem, I started a 9.2.2 domain, created a cluster and found the "WebLogic Plug-In Enabled" option ...
In your console, in the "Domain Structure" window, click myDomain \ Environment \ Clusters
Then in the main page, you've got "Settings for myCluster".
On the very first page, "Configuration > General" tab, you should have the folliowing attributes :
* Name
* Default Load-Algorithm
* Cluster Address
* Number of Servers In Cluster Address
Go at the bottom of the page and under the last link "Number of Servers In Cluster Address", you have a little "Advanced" link in blue. Click on it and it will expand another part of the page.
In that new part, you'll find new attributes and the one you're expecting.
This time, it should definitely help. -
Hi everybody,
How can i set focus to a cell?
In the Purchase Matrix:
oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Click()
But This set focus to column 3 (Item description. Not 1). Why?
Thanks
Carles
Edited by: Carles Costa on Mar 4, 2011 10:57 AMhi Carles Costa,
i think your issue is type of Purchase document. if it is Item type then matrix (38) and column(1) is itemcode,
if service type then matrix(39) and column 1 is Description.
this code oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Click() or oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Click(BoCellClickType.ct_Regular) is correct.
hope this help you.
thanks
H2 -
How to set MQMD format to String through JMS?
any inputs on how to set the message format (MQFMT) to string (MQSTrforcibly using JMS?
I have an application which writes a TextMessage to a remote Queue which is being received in MQHRF2 format.
This needs to be in MQSTR format.According to "http://www.share.org/proceedings/sh98/data/S1104.PDF"
You can do something like
queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
To set the Target as NONJMS client, so that it will accept Text message.
Hope this helps... -
Prevent copy of excel cells using OLE
Hi All,
I have protected my excel worksheet. But the cells can be copied. I want to prevent this copy of cells using OLE.
I have gone through the EXCEL proerties. But dont know how to exact use them?
Thanks in Advance
-nehaHello Neha,
I don't think CutCopyMode is the correct answer
Try the below code. It prevents the selection of cells, hence preventing copying.
REPORT zkris_ole_protectsheet.
* Start of Selection *
START-OF-SELECTION.
TYPE-POOLS ole2 .
DATA:
workbook TYPE ole2_object,
excel TYPE ole2_object,
sheet TYPE ole2_object,
cells TYPE ole2_object.
CREATE OBJECT excel 'EXCEL.APPLICATION'.
IF sy-subrc NE 0.
WRITE: / 'No EXCEL creation possible'.
STOP.
ENDIF.
SET PROPERTY OF excel 'DisplayAlerts' = 0.
CALL METHOD OF excel 'WORKBOOKS' = workbook .
SET PROPERTY OF excel 'VISIBLE' = 1.
* creating workbook
SET PROPERTY OF excel 'SheetsInNewWorkbook' = 1.
CALL METHOD OF workbook 'ADD'.
CALL METHOD OF excel 'WORKSHEETS' = sheet
EXPORTING
#1 = 1.
* naming and activating the index sheet
SET PROPERTY OF sheet 'NAME' = 'Index'.
CALL METHOD OF sheet 'ACTIVATE'.
CALL METHOD OF sheet 'Cells' = cells
EXPORTING
#1 = 3
#2 = 3.
SET PROPERTY OF cells 'Value' = 'You cannot select me'.
CALL METHOD OF sheet 'PROTECT'
EXPORTING
#1 = 'pass' " Password
#2 = 1 " Protect Drawing Objects
#3 = 1 " Protect Contents
#4 = 1." Protect Scenarios
SET PROPERTY OF sheet 'EnableSelection' = -4142. -
Border for Excel Cells generated using HTML
Hi,
I am generating html at server side and writing the content with
content type application/xls, all the generated data downloads to
me in excel sheet. Here in this excel document, I dont have borders
for the cell where i dont have the data. But for the cells, where data
is placed, cell borders are available. How do i make the whole excel sheet
cells as bordered.
Thanks in advance.
Regards,
Rizwan.If I have table border="1" they show up. I want
borders even in other parts of the excel sheet where
table is not there. Is it possible for that to get
the borders in entire excel sheet where data is
present and even if data is not present?IIRC, it would not be possible unless you paint all those borders on the HTML page. An alternate way is to generate the Excel sheet using Jakarta POI, but that would only make your work tougher. -
How to set values to unniverse prompts through java
Hi
I am using JAVA -BOSDK to access reports from infoview. I have a problem when any universe level prompt is present in the report. I am able to retrieve it through java when i say documentInstance.getPrompts() and when i set values to this prompt by Prompt.enterValues(String[] parameters) and then either save the report or saveAs another report , my new values dont get applied to the prompt. Only previous values get applied to the prompt. I checked doing prompt.getPreviousValues and prompt.getCurrentValues but when i save the doc then new values are not set.
here is a part of code iam using: the filterlist contains the ConditionFilterDataItems objects which contain the operands,operator and queryObjectName .I have added multiple prompt.getPrevious and current values for debug purpose.
private static void applyValuesToUniversePrompt( final DocumentInstance doc, final List filterList )
final DataProviders dps = doc.getDataProviders() ;
final DataProvider dataProvider = dps.getItem( 0 ) ;
final Query query = dataProvider.getQuery() ;
Prompts newPrompts = doc.getPrompts();
Prompt newprompt = newPrompts.getItem( 0 );
newprompt.getPreviousValues();
newprompt.getCurrentValues();
final ConditionContainer conditioncont = (OMConditionContainer) query.getCondition() ;
ConditionFilterDataItem conditionFilterDataItem = null ;
final Map promptMap = generateInstanceMap( doc ) ;
//Prompt [] promptArr ;
for( int i = 0 ; i < filterList.size() ; i++ )
conditionFilterDataItem = (ConditionFilterDataItem) filterList.get( i ) ;
final String [] operands = conditionFilterDataItem.getFilterOperand() ;
PromptsImpl univPrompts = (PromptsImpl)doc.getPrompts();
Prompt [] promptArr = new Prompt[univPrompts.getCount()];
for(int k= 0;k< univPrompts.getCount();k++)
promptArr[k] =(Prompt) univPrompts.getItem( k );
if(univPrompts.getCount()==0)
promptArr=null;
if(promptArr!=null)
for( int j = 0 ; j < promptArr.length ; j++ )
final Prompt prompt = promptArr [j] ;
final String promptName = prompt.getName() ;
final Prompt currentPrompt = (Prompt) promptMap.get( promptName ) ;
if( operands [j] != null )
currentPrompt.getPreviousValues();
currentPrompt.getCurrentValues();
currentPrompt.removeValues( currentPrompt.getPreviousValues() );
currentPrompt.enterValues( convertStringToArray( operands [j] ) ) ;
currentPrompt.getPreviousValues();
currentPrompt.getCurrentValues();
doc.setPrompts();
newPrompts = doc.getPrompts();
newprompt = newPrompts.getItem( 0 );
newprompt.getPreviousValues();
newprompt.getCurrentValues();
//doc.setPrompts() ;
doc.refresh();
doc.save();
newPrompts = doc.getPrompts();
newprompt = newPrompts.getItem( 0 );
newprompt.getPreviousValues();
newprompt.getCurrentValues();
// dataProvider.runQuery() ;
doc.refresh();
doc.saveAs( "universePrompt2",7148,null,null ) ;
doc.closeDocument() ;
private static Map generateInstanceMap( final DocumentInstance document )
final Map promptMap = new HashMap() ;
final Prompts prompts = document.getPrompts() ;
int count ;
if( prompts != null )
count = prompts.getCount() ;
for( int i = 0 ; i < count ; i++ )
final Prompt prompt = prompts.getItem( i ) ;
promptMap.put( prompt.getName(), prompt ) ;
return promptMap ;Hi Shruti,
Can U kindly refer this [thread|BusinessObjects Enterprise Java Software Development Kit (SDK) ??; and reply back.
Would appreciate your efforts !!! -
How to set Focus on a Cell in a Table
I have a column for which i set the table editor in the following way :
DateTextField contractStarts = new DateTextField();
itemTable.getColumnModel().getColumn(9).setCellEditor(new DefaultCellEditor(contractStarts);
When the focus is brought to a cell in 9th column thru tab key I want the cursor displayed and invariably invoking the cell editor without clicking the cell.
If i don't click on the cell the cell editor (contractStarts) implementation does not seem to work or otherwise does very well. Since normally a user would manoeuvre using tab key.
Can this be done. I am searching for possible clues to this.
Regards
ShomalOK well I tried your example again and it does work in my Chrome and Firefox browser. IE10 still won't let me type into the fields.
I borrowed some of your code and changed your input to fit with mine.
if (typeof oItem.getCells()[1].$().find('input').selectionStart === "number") {
oItem.getCells()[1].$().find('input').selectionStart =
oItem.getCells()[1].$().find('input').selectionEnd =
oItem.getCells()[1].$().find('input').value.length;
} else if (typeof oItem.getCells()[1].$().find('input').createTextRange !== "undefined") {
oItem.getCells()[1].$().find('input').focus();
var range = oItem.getCells()[1].$().find('input').createTextRange();
range.collapse(false);
range.select();
In debugger when I evaluate:
oItem.getCells()[1].$().find('input').selectionStart
it is undefined. -
How to set Border Color for Screens in WebDynpro?
Hi friends,
I was actually working on an application involving many screen Layouts.
After the designing of these Screens i have observed that on all the four borders of the screen are left with white as the background.So i just wanted to know whether we can select the choice of Border of the screen.
Please do let me know about this problem.
Thanks and regards,
Chandrashekar.Hi,
in case your deploying in a portal the WDJ might sport the Portal theme else you'll have to take at look at editing Web Dynpro Themes.
See <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/how%20to%20edit%20web%20dynpro%20themes.pdf">How to edit Web Dynpro Themes</a>.
regards,
Bernd -
How to setting oracle.jps.authorization.provider through EM
Hi,
I have installed Oracle SOA 11.1.1.5. How can I set the logging level of oracle.jps.authorization.provider in EM Console. I don't see this under EM Console -> Log configuration.
ThanksHi swati,
1. for this u will also require help of basis team.
2. these are the steps.
a) make an entry in DBCON
b) make connection string
(on the physical application server,
so that it can connect to secondary database)
(this will be done by basis team,
in which, they will specify the
IP address of the secondary database server,
the DATABASE ID, and the port number)
c) then using open sql / native sql,
we can use the secondary database connection,
just like normal.
d) if we use open sql,
then there must be Y/Z table on
sap as well as secondary database,
and the field names , their type all should be identical.
regards,
amit m.
Maybe you are looking for
-
Genius Bar Put Orb on my iPhone- Want to Remove
Good Morning All, After recieving a defective iPhone 5 I was promptly given a new one at the Apple store last night. While I was there the person helping me at the genius part put this orb on my phone- when I touch it it opens to a square that has ic
-
I'll create an iCal event on my laptop such as a meeting at 10:00 am. Then I sign into iCloud and the synced event has the same date but the time is always wrong. It seems to vary between 2 and 3 hours. Is this a time zone difference? The time zones
-
Hey guys, Forgive me for sounding like a noob but I cant seem to find the canvas. I xed out of it one time before canceling out of my project and now whenever i bring the project back up it doesnt show a canvas. I play the sequence and all I can hear
-
Can photo slideshows created on our iMac be seen on the TV via Apple TV? We cannot see them on the TV.
-
Adobe Illustrator CS6 hang when I select an Image
Hello, I'm having a problem with my Adobe Illustrator CS6, whenever I click an image to select, i need to wait for loading until it's selected. Quite annoying everytime I need to select few elements on my artboard. Any advise why does this happen ? T