Micro VBA Project for Excel VBA Output
$10-30 USD
货到付款
This should not take you long if you know anything about VBA and Excel Macros. The code is currently working, it just needs a minor tweak to make a slight change to not also export empty rows, which it happily does right now (adding the A column handle but nothing else in the cells, which is redundant once we have removed the photos from being exported here).
This is the relevant current code, below. It works well to output the entire sheet to a CSV file and this particular section deals with the removal of output if those four columns otherwise have data.
The issue though is that there are rows that exist that should not be exported at all because they don't really contain data anymore now that we have removed the images from being exported and are effectively duplicates, which causes issues later. So basically, all this needs to do is truncate the total number of rows it is exporting to not export extra rows.
The easiest way to tell that is to simply check if the DST_V_WEIGHT cell in that row has something in it. If it does, export the entire row as normal (without exporting those 4 specific columns as is already being done). If it does not, skip to the next row that has something in the DST_V_WEIGHT column then continue exporting as usual. Repeat until you have exported the entire contents of the cells as is already being done. That's it. The below code is close, basically what it needs to do is skip rows if the rows don't have anything inside DST_V_WEIGHT for that row.
Open sNoImgPath For Append As #2
For i = 1 To [login to view URL]
sEntry = ""
For J = 1 To [login to view URL]
sCell = [login to view URL](i, J)
sCell = Replace(sCell, """", """""")
If J = DST_V_SRC And i <> 1 Then
sCell = ""
End If
If J = DST_V_IMAGE And i <> 1 Then
sCell = ""
End If
If J = DST_V_POS And i <> 1 Then
sCell = ""
End If
If J = DST_V_ALT And i <> 1 Then
sCell = ""
End If
If sEntry = "" Then
sEntry = """" & sCell & """"
Else
sEntry = sEntry & ",""" & sCell & """"
End If
Next J
Print #2, sEntry
Next i
Close #2
If you want the entire exporting code section, I can send it to you as well.
That's all this needs to do.
项目ID: #15991873
关于项目
授予:
Hi there, Greetings! I’m interested in the job and can get it well done quickly. Feel free to contact me and discuss more details. Best Regards,
有4名威客正在参与此工作的竞标,均价$25/小时
Hello, I’m an Excel expert and I would like to help you with your project. Please check my profile and contact me to discuss further details. Regards.
Hi, Kindly review my profile to know more about my skills and experience required for this project. Regards Awaisjehangir