SpreadWebServcie.UploadContactListFile Method

 

上传联系人数据文件.

参数

参数

类型

描述

loginEmail

String

Spread账号的登录邮箱.

loginPassword

String

Spread账号的登录密码或者API Key.

fileType

String

上传数据文件类型包括".xls", ".csv", ".xlsx".

myFileStream

byte()

上传数据文件流(小于100M).

ContactListName

String

联系人列表的名称.

返回结果

如果上传成功,返回string:Spread has received your data and will send you an email after upload complete. (RequestID:123456).

例子

string loginEmail = "Spread@reasonables.com";

string loginPassword = "Spread";

System.IO.FileStream fileStream = new System.IO.FileStream(@"D:\content1.xlsx", System.IO.FileMode.Open);

byte[] arrayByte = new byte[fileStream.Length];

fileStream.Read(arrayByte, 0, Convert.ToInt32(fileStream.Length));

fileStream.Close();

SpreadAPI.SpreadWebService MySpread = new SpreadAPI.SpreadWebService();

string result = MySpread.UploadContactListFile(loginEmail, loginPassword, ".xlsx", arrayByte, "test 20130204");

参见

SpreadWebService Class | Spread Web Service Namespace