excel 外贸报价单怎么做

excel 外贸报价单怎么做,第1张

外贸报价单其实就是根据你的内贸报价单,除以该类产品国家的退税优惠率算出的外币换汇成本,最后的结果是外币报价。

我的是粗略意见:

工厂成本:(主料成本+辅料成本+外协加工成本+本厂人工成本+管理费+单件商检运费港杂费)=税前成本

税前价格=税前成本/利润率

人民币报价=税前价格/应税率

美元报价=人民币报价/换汇成本

换汇成本=外汇牌价*1.17/(1.17-退税率)

希望能帮到你。

 *** 作图表多点标记需要借助VBA实现,参考以下方法:

Sub DoRemark()

Dim i%, j%

For i = 1 To 15  'Row Range/line

For j = 1 To 9 'Column Range/point

If Cells(i + 1, j + 1).Interior.Color = 65535 Then Call Remark(i, j)

Next j

Next i

End Sub

Sub Remark(line%, point%)

ActiveChart.ChartArea.Select

ActiveChart.SeriesCollection(line).Points(point).Select

With Selection.Format.Fill

.Visible = msoTrue

.ForeColor.RGB = RGB(255, 255, 0)

End With

ActiveChart.SeriesCollection(line).Points(point).ApplyDataLabels

ActiveChart.SeriesCollection(line).Points(point).DataLabel.Select

Selection.Format.TextFrame2.TextRange.Font.Bold = msoTrue

With Selection.Format.TextFrame2.TextRange.Font.Fill

.Visible = msoTrue

.ForeColor.RGB = RGB(255, 0, 0)

End With

With Selection.Format.Fill

.Visible = msoTrue

.ForeColor.RGB = RGB(255, 255, 0)

.Transparency = 0

.Solid

End With

End Sub

效果如下(这里设置了快捷方式执行动作,选中图表后执行):

以上希望能帮上忙!

在页面上放一个FileUpLoad控件和一个按钮,下面是后台代码,给你参考:

using System.Data.SqlClient

using System.Data.OleDb

protected void Button3_Click(object sender, EventArgs e)

{

if (FileUpload1.FileName == "")

{

Response.Write("<script>alert('尚未选择上传文件!')</script>")

}

else

{

string sConnectionString = //"Provider=Microsoft.Jet.OLEDB.4.0Data Source= '"+ File1.PostedFile.FileName.ToString() + "'Extended Properties= 'Excel 11.0HDR=YES' "

//string sConnectionString = " Provider = Microsoft.Jet.OLEDB.4.0 Data Source = G:\\test.xlsExtended Properties=Excel 8.0"

"Provider=Microsoft.Jet.OLEDB.4.0" +

"Data Source=" + FileUpload1.PostedFile.FileName.ToString() + "" +

"Extended Properties=\"Excel 8.0\""

//建立EXCEL的连接

OleDbConnection objConn = new OleDbConnection(sConnectionString)

// System.Data.OleDb.OleDbConnection objConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0Data Source=" + File1.PostedFile.FileName.ToString() + "Extended Properties=""Excel 8.0HDR=YesIMEX=1""")

objConn.Open()

OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [Sheet1$]", objConn)

OleDbDataAdapter objAdapter1 = new OleDbDataAdapter()

objAdapter1.SelectCommand = objCmdSelect

DataSet objDataset1 = new DataSet()

objAdapter1.Fill(objDataset1, "XLData")

// DataGrid1.DataSource = objDataset1.Tables[0].DefaultView//测试代码,用来测试是否能读出EXCEL上面的数据

// DataGrid1.DataBind()

DataTable dt = objDataset1.Tables[0]

DataView myView = new DataView(dt)

//SQL SERVER的数据库连接

SqlConnection conn

string dns = ConfigurationManager.ConnectionStrings["contoadmin"].ToString()//连接串

conn = new SqlConnection(dns)

SqlCommand cmd = conn.CreateCommand()

cmd.CommandText = "INSERT INTO Student values(@stu_id,@stu_name,@stu_sex,@polity,@stu_birth,@stu_addr,@class_id,@remark)"

//cmd是插入数据库

SqlCommand cmd2 = conn.CreateCommand()

cmd2.CommandText = "INSERT INTO Login values(@stu_id,@stu_id,1)"

int count = 0//用来记录出错的条数

try

{

foreach (DataRowView myDrv in myView)

{

count++

//要关闭上一次的SQL Server的连接

if (conn.State.ToString() != "Closed")

conn.Close()

//每一次都要清空所有的CMD的参数

cmd.Parameters.Clear()

cmd2.Parameters.Clear()

//执行存储过程

//首先获得参数 共 3个

//@CardNo,@ToAddress,@CCAddress

SqlParameter stu_id = cmd.Parameters.Add("@stu_id", SqlDbType.Char)

SqlParameter stu_name = cmd.Parameters.Add("@stu_name", SqlDbType.Char)

SqlParameter stu_sex = cmd.Parameters.Add("@stu_sex", SqlDbType.Char)

SqlParameter polity = cmd.Parameters.Add("@polity", SqlDbType.Char)

SqlParameter stu_birth = cmd.Parameters.Add("@stu_birth", SqlDbType.DateTime)

SqlParameter stu_addr = cmd.Parameters.Add("@stu_addr", SqlDbType.Char)

SqlParameter class_id = cmd.Parameters.Add("@class_id", SqlDbType.Char)

SqlParameter remark = cmd.Parameters.Add("@remark", SqlDbType.Char)

cmd2.Parameters.Add("@stu_id", SqlDbType.Char).Value = myDrv[0].ToString().Trim()

//表示是输入参数

stu_id.Direction = ParameterDirection.Input

stu_name.Direction = ParameterDirection.Input

stu_sex.Direction = ParameterDirection.Input

polity.Direction = ParameterDirection.Input

stu_birth.Direction = ParameterDirection.Input

stu_addr.Direction = ParameterDirection.Input

class_id.Direction = ParameterDirection.Input

remark.Direction = ParameterDirection.Input

//参数赋值

stu_id.Value = myDrv[0].ToString().Trim()

stu_name.Value = myDrv[1].ToString().Trim()

stu_sex.Value = myDrv[2].ToString().Trim()

polity.Value = myDrv[3].ToString().Trim()

//paraYYYYMM.Value = ddlYear.Items[ddlYear.SelectedIndex].Value + ddlMonth.Items[ddlMonth.SelectedIndex].Value

stu_birth.Value = myDrv[4].ToString().Trim()

stu_addr.Value = myDrv[5].ToString().Trim()

class_id.Value = DropDownList5.SelectedValue

remark.Value = myDrv[6].ToString().Trim()

conn.Open()

cmd.ExecuteNonQuery()//写入SQL数据库

cmd2.ExecuteNonQuery()

}

Page.Response.Write("<script>alert('导入成功')</script>")

}

catch (SqlException ex)

{

Page.Response.Write(ex.ToString())

//Page.Response.Write(ex.ToString())//调试用

Page.Response.Write("<script>alert('添加第" + count.ToString() + "个学生时数据出错,请检查学号!')</script>")

objConn.Close()//关闭EXCEL的连接

}

finally

{

objConn.Close()//关闭EXCEL的连接

conn.Close()

}

}

}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11267865.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-14
下一篇 2023-05-14

发表评论

登录后才能评论

评论列表(0条)

保存