Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default WriteLine function

Guys,

I am using WriteLine function to write lines to a text file. Here's the
format of the line:

$insert_physical_layer(<layer_order, €œ<physical_layer_name€,
€œ<logical_layer_name€, €œ€);

Above, both physical_layer_name and logical_layer_name will be substituted
with values from arrays i.e. everything else is a constant.

Here's what I have so far for the WriteLine code:

objStackupFile.WriteLine("$insert_physical_layer(< layers_counter,"<layers(layers_counter, 1)","<layers(layers_counter, 2)", "");")

Above line does not work...has to do with wanted or unwanted double quotes
and/or more objects. Can you please tell me what the writeline should look
like?

Thanks for help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default WriteLine function

Try these changes. for a double quote to show in the out put you need to put
two in a row. Also I'm assuming that you have the variables layers_counter
and an array layers(X,2). The variables need to be seperate from the rest of
the string like I did below. I also added a message box so you can see the
results. if you can't read the entire string then put the string on a
worksheet like this

Range("A1") = WriteData

Here are the changes

WriteData = "$insert_physical_layer(<" & layers_counter & "," & _
"""<" & layers(layers_counter, 1) & """," & _
"""<" & layers(layers_counter, 2) & ", "");"
MsgBox (WriteData)
objStackupFile.WriteLine (WriteData)

"Varun" wrote:

Guys,

I am using WriteLine function to write lines to a text file. Here's the
format of the line:

$insert_physical_layer(<layer_order, €œ<physical_layer_name€,
€œ<logical_layer_name€, €œ€);

Above, both physical_layer_name and logical_layer_name will be substituted
with values from arrays i.e. everything else is a constant.

Here's what I have so far for the WriteLine code:

objStackupFile.WriteLine("$insert_physical_layer(< layers_counter,"<layers(layers_counter, 1)","<layers(layers_counter, 2)", "");")

Above line does not work...has to do with wanted or unwanted double quotes
and/or more objects. Can you please tell me what the writeline should look
like?

Thanks for help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default WriteLine function


Wherever you want a literal " character to appear in the string, use a
pair of " characters. E.g.,

S = "This has a ""quoted"" word."

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Mon, 23 Mar 2009 14:24:01 -0700, Varun
wrote:

Guys,

I am using WriteLine function to write lines to a text file. Here's the
format of the line:

$insert_physical_layer(<layer_order, “<physical_layer_name”,
“<logical_layer_name”, “”);

Above, both physical_layer_name and logical_layer_name will be substituted
with values from arrays i.e. everything else is a constant.

Here's what I have so far for the WriteLine code:

objStackupFile.WriteLine("$insert_physical_layer( <layers_counter,"<layers(layers_counter, 1)","<layers(layers_counter, 2)", "");")

Above line does not work...has to do with wanted or unwanted double quotes
and/or more objects. Can you please tell me what the writeline should look
like?

Thanks for help.

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
Console.Writeline output in VSTO Ed White Excel Programming 4 July 31st 08 06:42 PM
User Function Question: Collect Condition in Dialog Box - But How toInsert into Function Equation? SteveM Excel Programming 1 January 3rd 08 03:45 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM


All times are GMT +1. The time now is 10:49 AM.

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"