BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Alex_Ji
Calcite | Level 5

Hi all,

I am using Enterprise Miner 13.2 and I tried to import Excel file into the Text Import nodes, but encounter one issue. My excel has about 300 comments in different text boxes, but SAS does not recognize them as separate comments, but rather one giant comment. Due to this issue, I cannot run Text Cluster Node further down. Is there a way to import the excel sheet but have SAS recognize each text box as a separate comment? Please help!

Thanks in advance.

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

"Text boxes" are graphical objects, not data apparently.

This VBA code is supposed to loop over the boxes and convert it to cells.

I really don't do much VBA, so good luck. BTW what ever process was used to generate that data should probably reconsider the use of these boxes.

Option Explicit

Sub test()

    Dim r As Long
    Dim TxtBox As TextBox

    r = 1 'start in Row 1
   
    For Each TxtBox In ActiveSheet.TextBoxes
        Cells(r, "A").Value = TxtBox.Text
        TxtBox.Delete
        r = r + 1
    Next
   
End Sub

View solution in original post

4 REPLIES 4
ballardw
Super User

First thing I try with any issue regarding Excel is to export to (file save as ) CSV and try that file.

Alex_Ji
Calcite | Level 5

I tried that, and it is still showing document of 1...

ballardw
Super User

"Text boxes" are graphical objects, not data apparently.

This VBA code is supposed to loop over the boxes and convert it to cells.

I really don't do much VBA, so good luck. BTW what ever process was used to generate that data should probably reconsider the use of these boxes.

Option Explicit

Sub test()

    Dim r As Long
    Dim TxtBox As TextBox

    r = 1 'start in Row 1
   
    For Each TxtBox In ActiveSheet.TextBoxes
        Cells(r, "A").Value = TxtBox.Text
        TxtBox.Delete
        r = r + 1
    Next
   
End Sub

Alex_Ji
Calcite | Level 5

I found the solution. Use File Import Node instead of Text Import node will allow SAS to see each individual lines as an separate comment rather than a block of comment.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1425 views
  • 3 likes
  • 2 in conversation