Writing the data to a specific cell to an Excel file

 

I am able to write the values to the excel on each tick

using 


int A = FileOpen(FileName,FILE_WRITE);

FileWrite(A, Bid);

FileWrite(A, Ask);


---------------------------------------------

I would like to know how to write this data to a specified cell in an Excel.

For example I want to write some text to the Cell "B3" of Sheet1.


I am aware of DDE excel where we use the formula in the cell to retrieve the Ask or Bid Price.

But I am trying get a text message to a specific cell in Excel when a new signal is generated from the chart .


Thanks in Advance

Naren

 

Would DDE be an option - but I do't know whether it is still working!

May be you can try: https://www.mql5.com/en/code/1246

DDE - Server
DDE - Server
  • www.mql5.com
RickD e2e-fx.net Actually designed for MetaTrader 4 (MQL4), works excellent with small adjustments in MetaTader 5 (MQL5). It is a small MFC application (DDE server). All data that become available in MQL5 can be exported via this DDE interface (e.g. live data to...
 
Carl Schreiber:

Would DDE be an option - but I do't know whether it is still working!

May be you can try: https://www.mql5.com/en/code/1246

Hi Thank you for your response.

I am aware of DDE excel where we use the formula in the cell to retrieve the Ask or Bid Price.

But I am trying get a text message to a specific cell in Excel when a new signal is generated from the chart .

 
Anyone who is aware of writing data to a specific cell in an Excel!!!!
 
Documentation on MQL5: Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
Documentation on MQL5: Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
  • www.mql5.com
CSV file (all its elements are converted to strings of the appropriate type, Unicode or ANSI, and separated by separator). Flag is used in FileOpen(). Shared access for reading from several programs. Flag is used in FileOpen(), but it does not replace the necessity to indicate FILE_WRITE and/or the FILE_READ flag when opening a file. Shared...
 

You cannot write data (using only MQL) to an excel spreadsheet. You can write a CSV file which can be opened by excel in CSV mode, but it is not a workbook. You could, however, use this open source library which can put values directly to an excel workbook. 


https://github.com/Nondisclosure/MT4toExcel

 
naren292000:
Anyone who is aware of writing data to a specific cell in an Excel!!!!

Example please. 

Reason: