save curve data in excel or .txt into specified path

Altair Community Member
Updated by satya swaroop
Hi
R = omlfilename()
R = omlfilename('fullpath')
close all;
clear all;
clc;
c1=readvector('.odb','loadstep2:','RF-Reaction force (PART-1-1)','N1','Z')
plot(c1)
c2=readvector('.odb','loadstep2:','Displacement (PART-1-1)','N1','Z')
c=plot(-c2,-c1)
R=xlswrite('test.csv',[c1; c2])
i am generating a curve with this code
now i want to save or export the data points of plotted curved in the form of xlsx or txt in a specified path
how can i do this
appreciate your comments
thanks