marcsusy Posted November 13, 2012 Share Posted November 13, 2012 Hello: I have a question, how I can create borders in an Excel table. thanks Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 13, 2012 Moderators Share Posted November 13, 2012 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 More sharing options...
marcsusy Posted November 13, 2012 Author Share Posted November 13, 2012 We can use the following example of Autoit:$MyExcel = ObjCreate("Excel.Application")if @error then Msgbox (0,"","Error creating Excel object. Error code: " & @error) exitendifif not IsObj($MyExcel) then Msgbox (0,"ExcelTest","I'm sorry, but creation of an Excel object failed.") exitendif$MyExcel.Visible = 1$MyExcel.workbooks.adddim $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 = $arrSleep(2000)$MyExcel.activeworkbook.saved = 1$MyExcel = 0 Link to comment Share on other sites More sharing options...
water Posted November 13, 2012 Share Posted November 13, 2012 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
jdelaney Posted November 13, 2012 Share Posted November 13, 2012 (edited) 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 November 13, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now