Click here to monitor SSC
SQLServerCentral is supported by Redgate
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
Posted Thursday, February 2, 2012 4:51 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 7:57 AM
Points: 237, Visits: 1,581
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.

Colorful Colorado
You can't see the view if you don't climb the mountain!
Post #1246186
Posted Tuesday, February 7, 2012 4:31 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, January 22, 2015 9:01 PM
Points: 51, Visits: 320
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