Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am using the TransferSpreadsheet function in an Access macro to send data
across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is the Access field that isn't importing correctly a MEMO field? If it
isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Since I'm doing the work in a Access Macro memo isn't available only String.
However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Check the table structure of the table that is the source of your query. The
field type is determined there, not in the query or macro. If the field is a text field, you've maxed out the number of characters in Access. BTW: What version of Access and Excel are you using? -- Kevin Backmann "Paul Dennis" wrote: Since I'm doing the work in a Access Macro memo isn't available only String. However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Access 2003 SP2
The module strings together for each meeting [MDate] (date field) + [Comments] (memo field), i.e. MergeStatusUpdates = MergeStatusUpdates + F_Date + " " + F_Comments + Chr(10) MergeStatusUpdate is the name of the module and is defined as a string. Looking at the results of the query all is fine, it's just when it gets to Excel that it truncates. "Kevin B" wrote: Check the table structure of the table that is the source of your query. The field type is determined there, not in the query or macro. If the field is a text field, you've maxed out the number of characters in Access. BTW: What version of Access and Excel are you using? -- Kevin Backmann "Paul Dennis" wrote: Since I'm doing the work in a Access Macro memo isn't available only String. However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Have you tried changing the line feed to a carriage return?
Instead of Chr(10) try Chr(13) -- Kevin Backmann "Paul Dennis" wrote: Access 2003 SP2 The module strings together for each meeting [MDate] (date field) + [Comments] (memo field), i.e. MergeStatusUpdates = MergeStatusUpdates + F_Date + " " + F_Comments + Chr(10) MergeStatusUpdate is the name of the module and is defined as a string. Looking at the results of the query all is fine, it's just when it gets to Excel that it truncates. "Kevin B" wrote: Check the table structure of the table that is the source of your query. The field type is determined there, not in the query or macro. If the field is a text field, you've maxed out the number of characters in Access. BTW: What version of Access and Excel are you using? -- Kevin Backmann "Paul Dennis" wrote: Since I'm doing the work in a Access Macro memo isn't available only String. However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just tried, still get the same problem. If I take the Chr() out altogether I
still get the same problem. "Kevin B" wrote: Have you tried changing the line feed to a carriage return? Instead of Chr(10) try Chr(13) -- Kevin Backmann "Paul Dennis" wrote: Access 2003 SP2 The module strings together for each meeting [MDate] (date field) + [Comments] (memo field), i.e. MergeStatusUpdates = MergeStatusUpdates + F_Date + " " + F_Comments + Chr(10) MergeStatusUpdate is the name of the module and is defined as a string. Looking at the results of the query all is fine, it's just when it gets to Excel that it truncates. "Kevin B" wrote: Check the table structure of the table that is the source of your query. The field type is determined there, not in the query or macro. If the field is a text field, you've maxed out the number of characters in Access. BTW: What version of Access and Excel are you using? -- Kevin Backmann "Paul Dennis" wrote: Since I'm doing the work in a Access Macro memo isn't available only String. However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This might sound a bit convoluted, but I vaguely remember having a problem
similar to this. Create a table that matches the structure of your query, changing the errange calculated field in the new table structure to a memo field. Make a copy of the query and change it to an append query and append it to your new table. Then export the table to Access using your macro. I believe what's happening is that Access reads the fields of the query and treats your calculated field as a text field, and that's where you're running into the 255 character maximum. If you append the data to a table where the calculated field populates a memo field, your problem should be solved. -- Kevin Backmann "Paul Dennis" wrote: Just tried, still get the same problem. If I take the Chr() out altogether I still get the same problem. "Kevin B" wrote: Have you tried changing the line feed to a carriage return? Instead of Chr(10) try Chr(13) -- Kevin Backmann "Paul Dennis" wrote: Access 2003 SP2 The module strings together for each meeting [MDate] (date field) + [Comments] (memo field), i.e. MergeStatusUpdates = MergeStatusUpdates + F_Date + " " + F_Comments + Chr(10) MergeStatusUpdate is the name of the module and is defined as a string. Looking at the results of the query all is fine, it's just when it gets to Excel that it truncates. "Kevin B" wrote: Check the table structure of the table that is the source of your query. The field type is determined there, not in the query or macro. If the field is a text field, you've maxed out the number of characters in Access. BTW: What version of Access and Excel are you using? -- Kevin Backmann "Paul Dennis" wrote: Since I'm doing the work in a Access Macro memo isn't available only String. However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I had started to think along those lines and you confirmed it. Tried it and
it worked - many thanks. "Kevin B" wrote: This might sound a bit convoluted, but I vaguely remember having a problem similar to this. Create a table that matches the structure of your query, changing the errange calculated field in the new table structure to a memo field. Make a copy of the query and change it to an append query and append it to your new table. Then export the table to Access using your macro. I believe what's happening is that Access reads the fields of the query and treats your calculated field as a text field, and that's where you're running into the 255 character maximum. If you append the data to a table where the calculated field populates a memo field, your problem should be solved. -- Kevin Backmann "Paul Dennis" wrote: Just tried, still get the same problem. If I take the Chr() out altogether I still get the same problem. "Kevin B" wrote: Have you tried changing the line feed to a carriage return? Instead of Chr(10) try Chr(13) -- Kevin Backmann "Paul Dennis" wrote: Access 2003 SP2 The module strings together for each meeting [MDate] (date field) + [Comments] (memo field), i.e. MergeStatusUpdates = MergeStatusUpdates + F_Date + " " + F_Comments + Chr(10) MergeStatusUpdate is the name of the module and is defined as a string. Looking at the results of the query all is fine, it's just when it gets to Excel that it truncates. "Kevin B" wrote: Check the table structure of the table that is the source of your query. The field type is determined there, not in the query or macro. If the field is a text field, you've maxed out the number of characters in Access. BTW: What version of Access and Excel are you using? -- Kevin Backmann "Paul Dennis" wrote: Since I'm doing the work in a Access Macro memo isn't available only String. However String in a macro is unlimited. I used a query in Access to view the results from the Macro and it returns all the characters, hence this leads me to believe that it is how Excel received the data that truncates it down to 255. "Kevin B" wrote: Is the Access field that isn't importing correctly a MEMO field? If it isn't, the character limit is not in Excel, it's the 255 character text field limit in Access that's causing the problem. Excel column width limit is 255, but the number of characters allowed in a cell 32,767, although Excel will only display the first 1024 characters. -- Kevin Backmann "Paul Dennis" wrote: I am using the TransferSpreadsheet function in an Access macro to send data across to an Excel worksheet and all works well apart from one cell. The data being sent across is over 255 chars and Excel seems to limit the cell to only 255 chars hence I loose the rest of the data. Is there anything i can do to get around this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I format data from access to work in excel calculations? | Excel Worksheet Functions | |||
calling access data from excel | Excel Discussion (Misc queries) | |||
Exporting data in Excel permanently to Access | Links and Linking in Excel | |||
How to import data from a password protected Access DB into Excel. | Excel Discussion (Misc queries) | |||
New Excel data does not appear in linked Access table | Excel Discussion (Misc queries) |