Excel

<< Click to Display Table of Contents >>

Manual > Device Connection Guide > Microsoft > Connection Procedure >

Excel

overview

Microsoft Connects to Excel. To set it up, create a Excel file and specify the file name, sheet name, and cell name.

 

 

attention

Please note that you cannot write to a cell when it is being edited on the Excel side.

 

c_plc_0856

 

 

 

Connection example

This is a setting example for connecting to Microsoft or Excel.

 

Configuration environment

item

environment

OS

Windows10

 

 


Application side settings for connection example

 

1.Create a Excel file
 

2.Select the cell you want to connect with the cursor and enter a value. In this example, enter the following value in cell "B3" of Sheet "Sheet1".
 
c_plc_0857
 

3.Save the file
Here, save it as "sample_Excel.xlsx".
 

 


FA-Server side settings in the connection example

 

Use FA-Server to connect to the application for which you have set up communications.

 

1.Right-click on "Application" - "Driver" in the tree and select Add Driver.
 

2.Select the following units from the displayed driver list and add them:
 
c_plc_0858
 

3.Open the properties of the added unit (U01) and click Communication Settings.
 
c_plc_0859
 

4.Set "Communication Settings" as follows:
 
c_plc_0860
 
 

setting

Setting contents

Excel File Name

The name of the saved Excel file (here, "sample_Excel.xlsx")

Excel Sheet Name

Name of the sheet to communicate with (here, "Sheet1")

 

5.Perform a connection test to check the connection
 

c_plc_0675

 

If a message such as "Connection OK" is displayed, the connection is confirmed.

 

 

attention

If you get a connection error, please make sure that the excel file is open in one "excel.exe" process. If you have defined multiple units (excel files), please make sure that the excel file is open in one "excel.exe" process as well. You can check whether it is running in one process by looking at the details in the Task Manager.

 

c_plc_0861

 

 

 

6.Add a tag and set the cell with the tag's properties
 
c_plc_0862
 

setting

Setting contents

Cell Name

Target cell (here B3)

 

7.Go online

 

Please make sure that the cell value on the Excel side matches the tag value.

 

c_plc_0863

Please make sure that when you rewrite the tag value, the cell value on the Excel side is also rewritten.

 

c_plc_0864