Jump to content

How to create edges in an Excel Chart


marcsusy
 Share

Recommended Posts

  • Moderators

Hi, marcsusy. How about an example script to show us what you're working on, rather than having us guess? :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

We can use the following example of Autoit:

$MyExcel = ObjCreate("Excel.Application")

if @error then

Msgbox (0,"","Error creating Excel object. Error code: " & @error)

exit

endif

if not IsObj($MyExcel) then

Msgbox (0,"ExcelTest","I'm sorry, but creation of an Excel object failed.")

exit

endif

$MyExcel.Visible = 1

$MyExcel.workbooks.add

dim $arr[16][16]

for $i = 0 to 15

for $j = 0 to 15

$arr[$i][$j] = Chr($i+65)&($j+1)

next

next

$MyExcel.activesheet.range("A1:O16").value = $arr

Sleep(2000)

$MyExcel.activeworkbook.saved = 1

$MyExcel = 0

Link to comment
Share on other sites

What do you really want to do? Create borders around an array of Excel cells (you named it "table") or create edges in an Excel Chart (as you have written in the thread subject)?

A screenshot or example code would be fine.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Use the developer tool to record macros to figure stuff out:

Range("A1:L19").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlMedium

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlMedium

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlMedium

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlMedium

End With

Selection.Borders(xlInsideVertical).LineStyle = xlNone

Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

you will need to google the variable values...or create a message box, and include the variables to figure out the integers

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...