Products

Home Forums eaDocX queries Carriage return handling between Excel and EA Carriage return handling between Excel and EA

Home Forums eaDocX queries Carriage return handling between Excel and EA Carriage return handling between Excel and EA

#7309
Adrian Support
Participant

Hi Guillaume

Further to my previous I’ve just done a quick check and produced a small VBA function that may be a temporary workaround to address the issue with Excel stripping the CR from CRLF which EA needs.

The approach is to enter your data into a dummy column and using a VBA function modify the string that will be in the description field for import.

So –

  • Add a VBA module to the workbook – see code below {/li]
  • Create another column BUT DO NOT NAME IT – otherwise it will be recognised as a tagged value!

  • Put your notes into the relevant cell
  • In the Description put the function =addCR(Cell where the notes are) e.g. =addCR(F5) – this should created a copy of the notes that you have in that cell and you want to import – you won’t see any visual difference as the function just inserts control characters

You should then be able to import and get the CRLF as you expected.

Here is the code – I suggest you inspect and test as this is a 10min job – but thought you’d like the potential workaround quickly.

[code]
Function addCR(a As String)
Dim L As Integer
L = Len(a)
Dim sout As String
Dim s2 As String
For i = 1 To L
s2 = Mid(a, i, 1)
If Asc(s2) = 10 Then
sout = sout + Chr(13)
End If
sout = sout + s2
Next
addCR = sout
End Function
[/code]

Any issues let me know.

we will look into a longer term solution – but hope this helps today.

BR

Adrian

Compare licence prices

Choose the licence that’s right for you and your team

Prices

Download a free trial

Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.

Download