Hi All,
Read Range : Picture names cannot contain any of the following characters: :/?*
I have removed the picture from the file still getting this error.
Regards,
Vishal
Hi All,
Read Range : Picture names cannot contain any of the following characters: :/?*
I have removed the picture from the file still getting this error.
Regards,
Vishal
Use Rename file activity to replace the picture name
System.Text.RegularExpressions.Regex.Replace(PictureName,"[\\\/\?\*\[\]]","")
My Input:
System.Text.RegularExpressions.Regex.Replace("\/Name?*[Hi]","[\\\/\?\*\[\]]","")
Already tried these. But no success. Excel app scope taken too much time to read the data.
Can you try my above approach
Do you large amount of data in excel. As this issue has those solutions. If possible share the screenshot of the excel @Vishal_Kumar4
Regards
I didn’t understood how the name will get replace.
Yes i have large data in that sheet
In that case Macros will work for you in replacing those special characters if possible share the excel file. I will help you out with macros since Macros will get less time to execute
Regards
Is Picture is a column name can you make a screenshot of your input.If it is Sensitive information then put a sample input.
Can you give a try using my regex Expression it works pass your Input and put my regex expression.Use For each loop to iterate over your datatable.If you are using excel application scope then use For each row
CurrentRow("PictureName")=System.Text.RegularExpressions.Regex.Replace(CurrentRow("PictureName").ToString,"[\\\/\?\*\[\]]","")
Place the below code in text file
Sub ReplaceCharacters()
Dim ws As Worksheet
Dim rng As Range
Dim cell As Range
Dim str As String
Dim i As Integer
' Loop through all worksheets in the workbook
For Each ws In ThisWorkbook.Worksheets
' Define the range of cells in the current worksheet
Set rng = ws.UsedRange
' Loop through each cell in the range
For Each cell In rng
str = cell.Value
For i = 1 To Len(str)
Select Case Mid(str, i, 1)
Case ":", "\/", "?", "*", "[", "]"
Mid(str, i, 1) = ""
End Select
Next i
cell.Value = str
Next cell
Next ws
End Sub
Keep Show Excel Window property in Excel Process Scope as False, so that it won’t open excel at run time.
Regards
Well i had to manually check for each picture in the file using the Selection panel. I found out that there was an image place holder with some random name.
After removing this the issue is resolved now.