sherbetlemon Posted June 20, 2008 Share Posted June 20, 2008 guys,, how can I simulate ALT+Enter in PHP?? I have this script which exports data to excel using namespace I have data which contain long texts and some formatting in them.. whenever the generation of excel file encounters <br/> or <p> it moves from the current cell to the next cell,, is there a way to prevent it from moving to the next cell??? Any help will be highly appreciated!!! Thanks in advance!! Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 What in the world does Alt+Enter do? That means nothing to me. Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted June 20, 2008 Share Posted June 20, 2008 I don't have a windows machine to test it on, but you will probably have to escape the newline characters in the CSV that don't denote a new row of cells... "line 1", "data 1", "this is a \\ndescription\\non multiple lines" "line 2", ......... Quote Link to comment Share on other sites More sharing options...
sherbetlemon Posted June 20, 2008 Author Share Posted June 20, 2008 What in the world does Alt+Enter do? That means nothing to me. line break in excel... line break in a cell Quote Link to comment Share on other sites More sharing options...
sherbetlemon Posted June 20, 2008 Author Share Posted June 20, 2008 I don't have a windows machine to test it on, but you will probably have to escape the newline characters in the CSV that don't denote a new row of cells... "line 1", "data 1", "this is a \\ndescription\\non multiple lines" "line 2", ......... \n didb't work,, same with chr(10) or chr(13) Quote Link to comment Share on other sites More sharing options...
trq Posted June 20, 2008 Share Posted June 20, 2008 PHP runs server-side, I'm not real sure what exactly it is your trying to do. Quote Link to comment Share on other sites More sharing options...
sherbetlemon Posted June 20, 2008 Author Share Posted June 20, 2008 PHP runs server-side, I'm not real sure what exactly it is your trying to do. hmmm,, i'm generating excel files using php and namespace, it moves from the current cell to the next cell everytime the scripts encounter <br/>, <div>,<p> in the data which should not be the case.. is there a way to not make it move to the next cell,, I guess what i'm trying to say is that how can i do line break in a cell??? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 I'm sorry, but I don't use Excel, so I have NO idea what you're talking about. You could try removing the tags from the data or using htmlspecialchars on it. o-O Quote Link to comment Share on other sites More sharing options...
sherbetlemon Posted June 20, 2008 Author Share Posted June 20, 2008 I'm sorry, but I don't use Excel, so I have NO idea what you're talking about. You could try removing the tags from the data or using htmlspecialchars on it. o-O Thanks DarkWater.. actually, I've already done that.. but they want to retain all the html formatting on the cell,, they want the data to look exactly as it is on the web page... :'( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.