I want to overlay multiple sheets of data on a graph with Xlwings. This is the code I wrote, but of course you get this error.
import xlwings as xw
import pandas as pd
sht = xw.Book().sheets[0]
readdata = pd.read_csv('c:Users/user/test.csv')
xw.Range('A1').value = readdata
chart = sht.charts.add()
chart.set_source_data(xw.sheets[0].range('A3:A50, C3:C50'),xw.sheets[1].range('A3:A50, C3:C50'))
Error Msg.
set_source_data() takes 2 positional arguments but 3 were given
I want to create a graph like this image with xlwings.
I'm doing a project that runs macros in Python. I want to migrate from VBA to Python to simplify macro creation and management.
I'm afraid I can communicate with my ugly English. Please let me know the solution.