473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Question about Styles in Workbooks

I transfert data in a Excel File.

I want that the border of the cell in Excel have only left and right
border.

if i do :
range.Columns.Borders.LineStyle=Excel.XlLineStyle. xlContinuous;

My cell have up, down, left ,right borders. How can have only left and
rigth border ?

Thanks for your answer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
4 3594
You need to specify which border you're setting. Currently you're setting it
for all borders.
Change:
range.Columns.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
To:
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle =
Excel.XlLineStyle.Continous;
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle =
Excel.XlLineStyle.Continous;

"Kalaora luc" <lu********@free.fr> wrote in message
news:O1**************@TK2MSFTNGP10.phx.gbl...
I transfert data in a Excel File.

I want that the border of the cell in Excel have only left and right
border.

if i do :
range.Columns.Borders.LineStyle=Excel.XlLineStyle. xlContinuous;

My cell have up, down, left ,right borders. How can have only left and
rigth border ?

Thanks for your answer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2
if i do
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle =
Excel.XlLineStyle.Continous;
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle =
Excel.XlLineStyle.Continous;

there is no border in my Excel sheet. Have you test it?
Luc
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3
Yes, it's tested. Straight from an application we're working on that creates
and formats thousands of reports. Are you also setting the following?

range.Columns.Borders[Excel.XlBordersIndex.xlEdgeRight].Weight
and ColorIndex ?

"Kalaora luc" <lu********@free.fr> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
if i do
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle =
Excel.XlLineStyle.Continous;
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle =
Excel.XlLineStyle.Continous;

there is no border in my Excel sheet. Have you test it?
Luc
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #4
Yes, it's tested. Straight from an application we're working on that creates
and formats thousands of reports. Are you also setting the following?

range.Columns.Borders[Excel.XlBordersIndex.xlEdgeRight].Weight
and ColorIndex ?

"Kalaora luc" <lu********@free.fr> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
if i do
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle =
Excel.XlLineStyle.Continous;
range.Columns.Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle =
Excel.XlLineStyle.Continous;

there is no border in my Excel sheet. Have you test it?
Luc
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: theo | last post by:
if I have nested div combinations, can I call for styles only to specific nested combos? It's 3 lists <li>, on one page, needing different styles. <div id=list1><li> <a id="t1"...
11
by: Hello | last post by:
Hello, I am a self-taught home developer: Question: As it seems, most CSS people like to use DIVs as a division between styles. So, they would have a style for a div tag that would hold some...
3
by: Mansi | last post by:
I'm trying to use excel automation (from visual c# .NET) to fill data in a range by using arrays. I am using Microsoft's Knowledge Base Article 302096 as a reference and using the example listed...
3
by: JezB | last post by:
What's the generally accepted approach for using Styles and Stylesheets in a web application based on .aspx files, Web Controls, User Controls, and code-behind modules (c# in my case)? Most style...
1
by: SHANE CLARK | last post by:
I have a question...I am attempting to write the values of multiple textboxes to an MS Excel spreadsheet. I would like to be able to write the values to let say a1,b1,c1,d1...ect and then click on a...
1
by: Ishan Bhalla | last post by:
Hello, Am not sure if i have put this in the wrong discussion group. I have 2 workbooks with 1 worksheet each. I want to merge the workbooks into one. Any idea how to do it? I am using VB.net...
2
by: Mad Scientist Jr | last post by:
>From an asp.net web page I want the user to open the results of a SQL query in Excel, as automatically as possible (ie not having to loop through columns, rows, in code). For this,...
1
by: Stingerking | last post by:
Hi There You probably hear this all the time …… Hear it goes I am using VB6 My code creates a randam password and saves it in a workbook along with the date the macro was run. The macro...
10
by: Mtek | last post by:
Hi, I have a web page with some drop downs. Once the user makes his selections the bottom half of the page is populated. When that happens, I want to create a formatted report in a hidden div....
0
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.