Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

delete all cell in a collumn in an excel with ilogic

Darkforce_the_ilogic_guy
Advisor

delete all cell in a collumn in an excel with ilogic

Darkforce_the_ilogic_guy
Advisor
Advisor

is that a to dele all not emtry cell under collum A and B  start form cell A3 And B3  with ilogic?

 

I am using it as a log fil... but want to cleal the file if I start my ilogic on a new file

0 Likes
Reply
Accepted solutions (2)
1,051 Views
4 Replies
Replies (4)

JelteDeJong
Mentor
Mentor
Accepted solution

i have none code to test with but probaly you could do something like:

xlSheet.Range("A3:A9999").Delete

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes

WCrihfield
Mentor
Mentor

Using iLogic, I'm not seeing any easy way to actually 'delete' a cell in an Excel file. Nor be able to set which option to use for either shifting the other cells, Entire Row, or Entire Column, after you delete it, as you have within Excel.

I see a method to 'Clear' its value, though, if that's all you need.

You would most likely have to do this using Inventors API and VBA code with the VBA Editor, once you've included the right "References" for working with Microsoft Excel.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

J-Camper
Advisor
Advisor

replied to wrong post

0 Likes

J-Camper
Advisor
Advisor
Accepted solution

I think this code should work:

Dim FilePath As String = "C:\Projects\testing.xlsx"
Dim SheetName As String = "This_Sheet"
Dim Column As String = "B"
Dim Row As Integer = 3

GoExcel.Open(FilePath, SheetName)

While Row < 99
GoExcel.CellValue(Column & Row) = "" 'Value
Row = Row+1
End While

GoExcel.Save

GoExcel.Close

Should be easy enough for you to change the string values to look for the correct workbook.

0 Likes