Microsoft Excel: Difference between revisions

Jump to navigation Jump to search
199 bytes added ,  14 January 2016
Line 1: Line 1:


== Export MySQL query to Excel file ==
== Export MySQL query to Excel file ==
EXCEL limit:  
Excel limit:  
# "Total number of characters that a cell can contain: 32,767 characters"  
# "Total number of characters that a cell can contain: 32,767 characters"  
#* Using [http://www.w3resource.com/mysql/string-functions/mysql-substring-function.php MySQL SUBSTRING() function] ex: {{kbd | key = <nowiki>SUBSTRING(string_column, 1, 32767)</nowiki>}} for EXCEL 97<ref>[https://support.microsoft.com/en-us/kb/296053 Summary of capability limitations in Excel 97]</ref>-2007<ref>[https://support.office.com/en-us/article/Excel-specifications-and-limits-16c69c74-3d6a-4aaf-ba35-e6eb276e8eaa?CorrelationId=1de7e8d2-91e2-4eec-8868-4dc8cbd23463&ui=en-US&rs=en-US&ad=US Excel specifications and limits]</ref> (XLS 檔) ''unverified''
#* Using [http://www.w3resource.com/mysql/string-functions/mysql-substring-function.php MySQL SUBSTRING() function] ex: {{kbd | key = <nowiki>SUBSTRING(string_column, 1, 32767)</nowiki>}} for EXCEL 97<ref>[https://support.microsoft.com/en-us/kb/296053 Summary of capability limitations in Excel 97]</ref>-2007<ref>[https://support.office.com/en-us/article/Excel-specifications-and-limits-16c69c74-3d6a-4aaf-ba35-e6eb276e8eaa?CorrelationId=1de7e8d2-91e2-4eec-8868-4dc8cbd23463&ui=en-US&rs=en-US&ad=US Excel specifications and limits]</ref> (XLS 檔)
# "Length of formula contents: 8,192 characters" If the content start with the symbol {{kbd | key =<nowiki>=</nowiki>}} or {{kbd | key =<nowiki>-</nowiki>}}, Excel will consider the content is formula.
#* Using CONCAT {{kbd | key =<nowiki>'</nowiki>}} symbol ex: {{kbd | key = <nowiki>CONCAT('\'', string_column)</nowiki>}} If the content is not formula.
# "Worksheet size: 1,048,576 rows":  
# "Worksheet size: 1,048,576 rows":  
#* Using {{kbd | key =LIMIT 1048576}} for EXCEL 2007
#* Using {{kbd | key =LIMIT 1048576}} for EXCEL 2007
# "Length of formula contents: 8,192 characters" If the content start with the symbol {{kbd | key =<nowiki>=</nowiki>}} or {{kbd | key =<nowiki>-</nowiki>}}, Excel will consider the content is formula.
 
#* Using CONCAT {{kbd | key =<nowiki>'</nowiki>}} symbol ex: {{kbd | key = <nowiki>CONCAT('\'', string_column)</nowiki>}} If the content is not formula.
integrated solution for Excel limit 1 & limit 2
{{kbd | key =<nowiki>SUBSTRING(IF(LEFT(string_column, 1) = '-' OR LEFT(string_column, 1) = '=', CONCAT('\'', string_column), string_column), 1, 32767)</nowiki>}}


相關文章
相關文章

Navigation menu