Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Export memo field to Excel truncates values Expand / Collapse
Author
Message
Posted Thursday, February 02, 2012 4:51 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 11:27 AM
Points: 139, Visits: 508
Well, it looks like you have the latest Office service pack. Unfortunately I'm not able to duplicate your problem when using Memo fields - as long as I don't do any sorting or grouping or using joins with the memo field. I think it must come from the IIF() function that you are using, but why that should affect the output is a mystery. Hopefully somebody else will have a suggetion to try.

As an aside, is there a reason for doing this in Access rather than Excel? It's fairly easy to creat an Excel workbook with references other workbooks and will tell you where there are differences, etc.


Wendell
Colorful Colorado
You can't see the view if you don't climb the mountain!
Post #1246186
Posted Tuesday, February 07, 2012 4:31 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, December 27, 2013 4:11 AM
Points: 44, Visits: 286
Thats for your time... yes there was a reason to use Access as data manipulation which would be required later would be easier using queries.

I fixed my issue... by revamping the total code.

1. I created tables in access.. whereever I knew that the field size would be > 255, I made those column memo.
2. I wrote a VBA script to read the data cell-be-cell from excel file and insert into table.
3. on the click of another button, teh VBA code uses DoCmd and executes a query.. In the query - I have broken the Description filed into 5 - so the queyr looks somewhat like -

....
Description, MID(Description,1,250) as D1, MID(Description,251,250) as D2,MID(Description,501,250) as D3, MID(Description,751,250) as D4,
....


4. After populating the results in excel file using DoCmd - I wrote VBA script to
1. concatenate the D1,D2,D3,D4 values and display that in the Description field.
2. delete the D1,D2,D3,D4 fields. The deletion was sequenced in the reverse order to ensure no column reference changed post deletion of columns.


Thanks all for your help.
Post #1247974
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse