#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default php export problem

I have a spreadsheet in Excel 2010 into which I enter data each day. The
sheet is set up to use CONCATENATE to wrap the data with html tags and
uses CONCATENATE again to bring them all together. I then right click
the final CONCATENATE cell, copy the results and then paste them into
the rest of the html on my raw web page. This works without any issues.

However, I now need to include some PHP in the middle of all this and
this is producing some odd results that I cannot remove. The copied
output has a " added at the start and the same added at the end and,
within the code, every " is doubled so that something like <p
class="subtitle" becomes <p class=""subtitle"".

The PHP is held in one cell with ALT-Enter used to put each statement on
a separate line within the cell. The actual PHP looks like:
<?php
$json_string = file_get_contents('http://website_address.json');
$parsed_json = json_decode($json_string);
$weathernow = $parsed_json-{'current_observation'}-{'weather'};
// $time = $parsed_json-{'current_observation'}-{'observation_time'};
$icon = $parsed_json-{'current_observation'}-{'icon_url'};
$text1 = "The current weather here is<span class=lowercase
$weathernow</span&nbsp;&nbsp;<img class=middle src=";
$text2 = "";
echo $text1,$icon,$text2;
?

Could anyone offer a way to stop the addition of the " characters and
their duplication?

--
F

www.vulcantothesky.org - keep the last remaining Vulcan flying
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default php export problem

Not sure this will work but my thinking is...

just as you use the code substitute &nbsp;&nbsp; to denote " "

...why not use the appropriate code substitute for the double quote
character!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default php export problem

On 26/11/2014 11:07, GS wrote:
Not sure this will work but my thinking is...

just as you use the code substitute &nbsp;&nbsp; to denote " "

..why not use the appropriate code substitute for the double quote
character!


Thanks, but part of the problem is the unwanted introduction of a single
" at the start and end of the output when I copy it.

--
F

www.vulcantothesky.org - keep the last remaining Vulcan flying


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default php export problem

On 26/11/2014 11:07, GS wrote:
Not sure this will work but my thinking is...

just as you use the code substitute &nbsp;&nbsp; to denote " "

..why not use the appropriate code substitute for the double quote
character!


Thanks, but part of the problem is the unwanted introduction of a
single " at the start and end of the output when I copy it.


And so using the code substitute would prevent that same as if you were
adding via a macro! Or no?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default php export problem

Also.., are you pasting to the webpage or to the source code behind it?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd Export as PDF problem - Killing me. Michael[_4_] Excel Programming 6 October 12th 11 11:14 PM
Problem in data export umeshawasthi Excel Programming 1 May 19th 07 11:43 AM
Export txt file problem Oscar Excel Programming 3 July 21st 06 02:25 PM
Export data problem pawelwx Excel Programming 1 April 3rd 06 04:28 PM
Another problem with export to TXT Tom Excel Programming 1 March 15th 05 11:15 AM


All times are GMT +1. The time now is 02:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"